Posted by Weston Ganger
I wanted my SMB share to automount on my Macbook running OSX Yosemite.
It should have been easier than this to set this up but its a Mac.
First create a shares directory somewhere underneath your home folder. I had endless permissions troubles when placing it elsewhere.
# /etc/auto_master ## Automounter master map # +auto_master # Use directory service /net -hosts -nobrowse,hidefromfinder,nosuid /home auto_home -nobrowse,hidefromfinder /Network/Servers -fstab # Insert this line /Users/my_username/shares auto_smb # WARNING: Whatever folder you choose here will be completely overwritten /- -static
Now we need to setup the
auto_smb script. Create a new file at
# /etc/auto_smb my_share_name -fstype=smbfs ://username:email@example.com/my_share_name
Lastly set the permission & reload.
# Set scripts permissions sudo chmod 600 /etc/auto_smb # Reload auto_master config sudo automount -vc
Related External Links: