auto mount automount SMB samba windows shares at boot reboot on OS X 10.7 Mountain Lion
Pardon the keyword-laden title. I’m going to reproduce the contents of this wonderful page with a dash of this page against deletion.
What you need to do is:
Become root:
sudo su -
Create the file:
touch /etc/auto_smb
Close non-root access to the file:
chmod 600 /etc/auto_smb
Using your favorite editor, add this line to /etc/auto_smb; obviously replacing [user], [password], [machine] and [share] with the right bits:
/Volumes/[share] -fstype=smbfs,rw ://[user]:[password]@[machine]/[share]
Using your favorite editor, add this line to /etc/auto_master:
/- auto_smb -nosuid
Reboot (or automount -vc) and it should mount the share at reboot.
This was for a build server that is never logged in to, thus the need for boot time instead of login time mounting.
ETA: you also need to add a line to the crontab of the user that needs the share to be mounted; I did something like @reboot /bin/bash -l -c ‘cd /Volumes/Share’ and it works for me.

haha, your titles are such google bait, and I love it.
Lefty
11 September 2012 at 18:28