I have been trying to achieve smb drive automounting on OS Sierra but I am unable to do it properly.
I hacked /etc/fstab which seems to work on this OS to the point that I am unable to force it to change ownership or chmod so other users than root can access it.
I seems that automount is ignoring all my attempts to set uid or gid for the mount and its always mounted as root:wheel.
I went through several threads that deal with that and found no solution anywhere so I tried using Automator with Applescript, where I used a command to Finder app that mounted drive for me, but it always asks for credentials so it's no use for me either.
Can anyone please provide working solution that mounts smb drive on OSx that's accessible for other users than root and works in headless mode (so it does not require any user to log in?)
Thanks
Best Answer
This works for me on macOS High Sierra:
That mounts the SMB share and shows it in the desktop
Otherwise I could use the auto_master. I added this entry in /etc/auto_master (you need root access):
And then I created /etc/auto_smb:
admin is the user allowed to read/write in my NAS and "password" is the password.
Also please note that the "soft" option is quite important. In case the resource is not available (network down or else) without it something in the OS may get stuck trying to connect to the resource.