How to use automounter

I am interested in auto mounting a network directory on my Mac Mini. I've done this on Linux, and would like to do the same on Mac. I have successfully bound this computer to an Active Directory domain, and I can log in as a domain user using AD credentials. Now to mount a network share for this user.


In the 'man auto_master' it says,


A map name beginning with / is the pathname of a file containing the map, otherwise the name represents a map to be found as a file in /etc or to be read from Directory Service (and thus from whatever sources Directory Service uses, such as NIS or LDAP servers).


Note that, in order to get automounter maps from NIS, the "BSD Flat File and NIS" plugin must, in the Directory Utility application, be enabled and configured to "Use NIS domain for authentication".


So, first of all, how to I enable the "BSD Flat File and NIS" plugin, and enable the "Use NIS domain for authentication"? In my Directory Utility, I see no such option. I do have "Use UNC path from Active Directory to derive network home location" checked. "Network protocol to be used" smb.


However, when the domain user logs in he is not put into the home directory location specified by the Active Directory. Perhaps this is because the server sharing that location does so through nfs, not smb? The protocol options are smb and afp. Is there a way to specifiy nfs?


THX --Mark

Mac mini

Posted on Jun 28, 2018 12:19 PM

Reply

Similar questions

3 replies

Jun 29, 2018 6:17 PM in response to markfoley

Hello markfoley,

First of all, I wouldn't recommend attempting to mount a home directory. And certainly not at first. Start slowly.


I don't think Apple event support auto mounting anymore. It may still work, but it was never reliable. Look for a Technical White Paper from June 2009 titled "Autofs: Automatically Mounting Network File Shares in Mac OS X". Apple has taken down the document, but it is still available "elsewhere".


I used to have my machine setup for this all the time. But it requires a well-configured, fast SMB network with your Mac bound to AD. I don't meet those requirements anymore. I definitely don't recommend trying to mount a home directory. I could mount network home directories, but only as a local subdirectory. Even then, the mount would flake out on a regular basis. One of the worst things to try was QuickLook. I also couldn't reliably edit files. I generally had to copy them locally, edit them, then copy them back. This is as good as it gets with Mac networking.

Jun 29, 2018 5:59 PM in response to markfoley

Perhaps too much information in my first post. Let me try again. On the mac I can do:


sudo mount -o rw,resvport -t nfs mail:/redirectedFolders/Users/mark /Users/mark


This will mount the network folder from the mail host under the user mark's home directory. That works just fine and files are owned by mark's UID.GID. However, I'd like to make that an automount. the Mac's /etc/auto_master has:


/home auto_home -nobrowse,hidefromfinder


the /etc/auto_home has:


+auto_home # Use directory service

#

# Get /home records synthesized from user records

#

+/usr/libexec/od_user_homes


If I run 'od_user_homes mark' I get nothing. The od_user_homes man page says:


od_user_homes is a program that takes a user name specified by username and, if there's a user record for that user in Open Directory, and that user record contains a HomeDirectory attribute, and the <path> portion of the HomeDirectory attribute is empty or just /, prints the URL from that attribute, and exits with an exit status of 0. If there is no user record for that user, or the user record doesn't contain a HomeDirectory attribute, or the <path> portion is neither empty nor just /, or if an error occurs, nothing is printed, and od_user_homes exits with a user status of 1. This is intended to be used as an executable map for auto_home.


So, the question is, how do I get HomeDirectory attribute information for this user into the Open Directory or Directory Services?

Jun 29, 2018 11:30 PM in response to markfoley

I figured this out. I could not get the automounter to use the /home mechanism using Open Directory or Directory Services. What I did was the following line to /etc/auto_master:


/- auto.domUsers -nobrowse,hidefromfinder


the -nobrowse,hidefromfinder options are needed or the user will never be able to log in even after waiting an hour. Be sure to comment out the original /- line.


In /etc/auto.domUsers I have:


/Users/mark -fstype=nfs,rw,resvport mail:/redirectedFolders/Users/mark


When Active Directory domain user 'mark' logs in he now gets his Redirected Folder and Desktop.

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.

How to use automounter

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