macOsx: mount a window’s share on mac

1.sudo vi /etc/auto_master

Add the following line to the bottom:
– auto_smb
Save, exit vi, and create a new file for your samba connections like so:

2.sudo vi /etc/auto_smb
Add the shares you would like to mount, one per line, in this format to the newlly created file:
/Users/username/mount -fstype=smbfs,soft ://user:password@server/share

In the above, the username is your mac username, basically path to your home directory. You can mount it any were inside your home directory, It’s not necessary to create the actual mount point directory, automount should make it for you. Though, to be safe, you can do so. Just run ‘mkdir ~/path/to/mount’. User and password after // is your credentials for the remote samba or windows share.

3. Finally, run automount to mount the new shares:
automount -vc