Autofs in Catalina does not auto mount

I have 4 shared network drives in my workplace on Win Server 2003 which I connect to using VPN. I can mount these drives, once I connect to the VPN, through the option 'Connect to Server...'; I don't require credentials for mounting the drive as I connect to the VPN using the Win AD credentials which automatically gives access to these drives.


After searching on the internet I came across the Autofs method of auto mounting smb shares and not requiring to manually connect to the shares using 'Connect to Server...' Below is the entries I have made for auto mounting


In /etc/auto_masters I added,

/System/Volumes/Data/mnt/Resources auto_resources -nosuid,noowners

In /etc/auto_resources I added,

Office_D   -fstype=smbfs ://192.168.1.200/d
Office_F   -fstype=smbfs ://192.168.1.200/f
Office_AGupta   -fstype=smbfs ://192.168.1.200/A%20Gupta
Office_Shared   -fstype=smbfs ://192.168.1.200/shared

This has created a mount point 'Resources' and my shares are mounted in it.


Now the problem I am facing is that when the VPN disconnects the shares are shown as empty folders; when I reconnect to the VPN the shares do not auto mount. I have to manually connect to the server using the option 'Connect to Server...' and then the shares are mounted at the mount point.


Is there a mistake in my entries that are preventing the auto mounting of the shares?


MacBook Pro 15″, macOS 10.15

Posted on Oct 21, 2020 10:11 AM

Reply

Similar questions

5 replies

Oct 25, 2020 9:19 AM in response to agupta_mac

Do the automounts work after restarting and then connecting to the VPN?


It is not clear from your description if the problem is just getting automount to work at all or getting automount to work after disconnecting from the VPN. I can understand if the system goes into an error state after disconnecting the VPN. That is one of the problems with automounting. It was never designed for mobile devices that come and go.


However, if you can't get the automount to work at all, then that might be something that is fixable. You can still find the Apple autofs document on the internet. Technically that is a copyright violation, so I can't post a direct link to it. But if you Google the title, "Autofs: Automatically Mounting Network File Shares in Mac OS X" it is easy to find. There may still be a copy in the Wayback Machine at the Internet archive. You can Google any of my old posts ("autofs" "etresoft" site:discussions.apple.com) where I posted the old, official Apple URL and plug that into the Wayback machine.


You can also try 3rd party sources like this one: https://gist.github.com/rudelm/7bcc905ab748ab9879ea


Just remember that 3rd party sources almost always have very poor security. With a properly configured Active Directory network, you don't need to hard-code your account and password. Virtually every single 3rd party page suggests hard-coding your account and password.


And finally, you could consider trying FUSE: https://osxfuse.github.io

I used to use this quite a few years ago over a VPN and sshfs connection. It was quite flaky but proved useful overall.

Oct 24, 2020 7:39 PM in response to agupta_mac

I think you may be just pushing it too far. Automounting really isn’t supported anymore. Apple used to have a nice how-to document for autofs but they eventually took it down. It just isn’t something that many people use.


And you are trying to use it over a VPN. After reconnecting to the VPN, you can try running the command:


automount -vc


If that works and fully restores functionality, then you can try integrating that command to be called when the network connects. I’m not sure how you would do that these days. Years ago, I wrote a little app that listened for network changes via System Configuration (I think) and would update the network. I my case, I needed to add a search path to a particular local domain that the VPN didn’t create for me.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Autofs in Catalina does not auto mount

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.