Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm nearly finished setting up my Open Directory master to allow users to be managed centrally and logged in on any of the client machines at home.

I found discussion suggesting that using an AFP share for the 'Users' automount would result in network users (cf. users defined locally, or Portable Home Directory users) are unable to use fast user switching, as the first user logging in would trigger the automount and mount the 'Users' share with his permissions, preventing further users from using the mount.

I've also found some suggestions to configure autofs such that the 'Users' share is mounted prior to any user logging in, but not great amounts of details along these lines.

I'd greatly appreciate some instructions to set up autofs - ideally, on the OpenDirectory server rather than each client's etc/fstab or equivalent location, so that it isn't required per every client machine - to get fast user switching working with network users.

share|improve this question

I got two sites, connected to each other by a site-to-site vpn. The sites are named s1 and s2, s1 and s2 both having several Macs and PC's. I want all the users on all the Macs having access to a shared data map on s1, lets say Data_s1, and to a shared data map on s2, lets say Data_s2. Data_s1 will reside on a server on site s1, Data_s2 will reside on a server on site s2. For the users, Data_s1 en Data_s2 will be in the parent map Data (will be indirect map. For more info and the best info I found so far, see this white paper)

The best way to do this, is by creating automount maps and you can do this in /etc/auto_master etcetera, etcetera. But than you will have to do this on every single machine in both s1 and s2. A more elegant way to do this, is by using the auto mount feature in LDAP, but all this has been changed in Lion and I couldn't find that anywhere (after looking for hours on the web).

In Lion, there is a new utility in the Directory Utility.

Go to - System preferences - Users & Groups - Login options - click lock & authenticate - Edit (at bottom, next to Network Account Server) - Open Directory Utility - Directory Editor (on top).

Now choose the node: /LDAPv3/'IP' ('IP'= if you are running the directory utility on the server itself, or else the IP of the server) and in View, choose AutomountMap.

Click the lock and authenticate as a Directory Administrator.

Click "+" at bottom left. In the left pane an entry appears, something like "Nameless 1". In the upper right pane, you will see "Recordname" with its name. This name can be changed in the bottom right pane. Change it to "auto_master", making the equivalent of the auto_master file in /etc. When you save this, a new object of the object class AutomountMap is created.

The new object also contains some attributes that can't be changed (greyed out), like e.g. RecordType. Here, I also create the indirect map Data, in which Data_s1 and Data_s2 will appear later on (see scheme in white paper mentioned above). So far so good.

Now, we have to create the automount-objects. Change View - AutomountMap to View - Automount.

Add an object (Bottom +) which will mount the Data_s1 map. Change Recordname to Data_s1. Add an attribute to the Data_s1-object by clicking the + sign in the middle, between the two right panes. Accept the default attribute (Automountinformation) and put in the path to the map on the fileserver on s1.

This should complete the auto mount information, but here I am stuck: Saving the object results in an error: Invalid recordtype (4101).

If someone could get us further from this point on, equally appreciated.

In fact, this is not for creating home directories solely, it is a more general approach. Creating home directories on a certain server can be done through the Server App.

share|improve this answer

I set up phpLDAPadmin for the DirectoryServer. I noticed that there wasn't an AutoMount Container. Because of that I created (in phpLDAPadmin) below the automountMap entry (e.g. auto_master) automount entries. Now I see this entries in DirectoryUtility below AutoMount.

Restart autofs on Linux. This works with Mountain Lion Server and an Ubuntu Precise Pangolin client.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .