automount SMB shares on macOS High Sierra

muffinMan

Dabbler
Joined
May 13, 2018
Messages
10
Is anyone successfully using the automount service in macOS to mount SMB shares? Supposedly it is supposed to work along these lines (link is a few years old and I haven't found an example for setup on macOS High Sierra). Getting this to work would be an improvement over adding the share point to my login items, which I have done, but still drops the SMB connection occasionally (I'm not sure if waking from sleep with a password triggers a "login," and if I bring my MacBook home from work the drive isn't necessarily automatically mounted when I connect to my home wifi).

I've set up my /etc/auto_master and /etc/auto_nas files as per the link above. After the setup, it looks like the SMB is mounted ("media", my share, is mounted at /mnt/nas on my mac) but when I try to open the share directory or use "ls" commands within it, I get the error:
Code:
 cannot open directory '/mnt/nas/media/': Host is down

But the host is not down. I can use Finder and the GUI to mount the share at /Volumes and I can navigate, read, and write just fine. I'm trying to figure out if this is a problem with my mac or if there are settings in me SMB share I might have to change in FreeNAS to get this to work. Anyone experiencing similar challenges? Thanks!
 

muffinMan

Dabbler
Joined
May 13, 2018
Messages
10
Were you able to resolve this?
I was not. It looks like automounting shares is broken in macOS for now. For some reason, the mount point changes owners to root/wheel after mounting, and the user can't access it. One workaround I haven't tried it is to enable root user for macOS, but I'm not interested in doing that. Apparently, for the past couple of releases, this has been an open bug, but Apple has not properly addressed it.

https://apple.stackexchange.com/a/272055/291533
https://discussions.apple.com/thread/7915152

But yet, this post apparently says it should work with guest permissions. I'll try it when I get back to my local network.
 
Joined
Jul 3, 2015
Messages
926
What I recommend to Mac users is to map the share and check the box to remember login details. Then I drag the Share folder or a folder below to the Favourites tab in Finder. When the machine logins in for the first time or when you need it just click your Favourite icon in Finder and boom. Its not 100% full proof but pretty good.
 

rwillett

Dabbler
Joined
Feb 18, 2015
Messages
37
I know this is very late but I may have a found a solution to the automount issue with smb. I have had the same problem for a few years with this, not realising that it was a bug/defect/feature in Apple's code. I used Synology boxes before and never got the automount to work.

Just downloaded and paid for a product called Automounter from PixelEyes and their 'Pro' add on. This seems to address the problems with automounting and appears simple and easy. Cost me about £14 which is about $14 which is about 14 Euros.

https://www.pixeleyes.co.nz/automounter/

Just trying it out on FreeNAS and it seems to do what it says on the tin.

No connection to the company other than as a customer.

Rob
 
Last edited:
Top