Login problems with Automount and SMB shares I am using automount to mount a set of network shares on my macbook. My problem is that when these shares are not available, e.g. when I am out of the office using a different network, I cannot login to my mac. The login screen progress bar stays stuck forever (I've let it go well over 12 hours to test).

Currently, my /etc/auto_master looks like 

#
# Automounter master map
#
+auto_master        # Use directory service
/net            -hosts      -nobrowse,hidefromfinder,nosuid
/home           auto_home   -nobrowse,hidefromfinder
/Network/Servers    -fstab
/-          -static
/-  auto_smb    -soft,noowners,nobrowse,rw


Network shares are mounted in the /etc/auto_smb map file, which looks like this:

/mount/mnt1 -fstype=smb ://&lt;user&gt;@&lt;server&gt;
/mount/mnt2 -fstype=smb ://&lt;user&gt;@&lt;server&gt;
/mount/mnt3 -fstype=smb ://&lt;user&gt;@&lt;server&gt;
/mount/mnt4 -fstype=smb ://&lt;user&gt;@c&lt;server&gt;


I am certain that automounter is the source of the problem, because if I comment out the last line of /etc/auto_master, I can log in normally no matter what network I am using.

Is there any way I can fix this so that automount fails gracefully on login when the mounts are not available?

I am using macOS Mojave 10.14.3
I have exactly the same problem. I follow the exact step described here: http://blog.grapii.com/2015/06/keep-network-drives-mounted-on-mac-os-x-using-autofs/ 

/Users/username/Desktop/Synology  auto_nas


Then I created the /etc/auto_nas with entry like the following

DSVideo -fstype=smbfs ://username:password@nas/video
DSPhoto -fstype=smbfs ://username:password@nas/picture


This creates a "Synology" folder on my Desktop with a DSVideo and DSPhoto subfolder which icon looks like a mounted disk as a subfolders.

It was working flawlessly with El Capitan MacBook Pro, however when I do the same with my iMac with Mojave 10.14.4, I experienced the same issue similar with yours in which my Mac would locked up just after login while loading Finder in which I could not launch any other applications.

I saw a silver lining after I read your post. It seems that adding nofail was able to prevent our Mac from being locked out if it fails to mount. 

/-  auto_smb    -soft,noowners,nobrowse,rw,nofail


Now come to my suggestion for a possible solution. I have been reading forums for many many days. Can you try the following which might help you to mount your network drives?

Have you changed the ownership of your auto_smb to root access only?

sudo chmod 600 /etc/auto_smb


Have you followed this recommendation from Apple to disable a security feature so that you can connect without providing additional confirmation? https://support.apple.com/en-us/HT207112

sudo defaults write /Library/Preferences/com.apple.NetworkAuthorization AllowUnknownServers -bool YES


Alternatively, you can follow this instruction 
https://gist.github.com/rudelm/7bcc905ab748ab9879ea

So instead of just using the following in your auto_smb:

/mount/mnt1 -fstype=smb ://&lt;user&gt;@&lt;server&gt;


You can add:

/mount/mnt1 -fstype=smbfs,soft,noowners,nosuid,rw ://username:password@&lt;server&gt;


Please let me know whether any of this works for you? Thanks.