Connecting Shared Folders on MacOS using Automount


Setup

Edit /etc/auto_master and add something like the below entry, where /Users/fred/shares is where your shared folders are automatically mounted.

/etc/auto_master

/Users/fred/shares  auto_smb

Create /etc/auto_smb if not already created. The above auto_master line is referring to this.

/etc/auto_smb

myfiles -fstype=smbfs,soft,noowners,nosuid,rw smb://username:password@mysmbserver/myfiles

Note: substitute your username and password in the 'username:password' section, mysmbserver is either the IP address or DNS entry for the smb server and 'myfiles' is the name of the share. Note: the far left version of myfiles is the mount entry under /Users/fred/shares of wherever you assign it in the auto_master file. Note automount doesn't work particular well in the /Volumes folder.

Activating

Run the following command when complete

sudo automount -vc

If all went well it should mount your volumes in the specified folder as soon as you browse to it.

Copyright © 2020 | Ben Hutton