Mac and OpenLDAP: Local homes for network users
I wanted a Mac to authenticate users against our Debian OpenLDAP server, but to create a local home directory on the Mac (see here for more details). The usual configuration for network users on the Mac is to mount their homes from the server over NFS. There are many excellent instructions on the net on how to do that. But finding help on how to have them use a local home instead was much more difficult.
It turns out it can be done very simply, by disabling one line in /etc/auto_master on the Mac. By default, it contains +auto_master
, which tells the Mac's automounter to look for an automount map in LDAP. If this line is disabled, the Mac will create a local home for network users the first time they log in. Since our userHomes in LDAP are defined as /home/username, the Mac home is created under /home instead of /Users, which is fine.
So for such a setup, you do NOT need to import an Apple schema into your LDAP directory. (That was quite a hassle because you need to tweak the original schema which is not quite kosher; but it was unnecessary).
All you need to do is comment out this single line in /etc/auto_master to make it
#+auto_master # Use directory service
Or copy/paste this:
sudo perl -i.orig -pe 's/^(\+auto_master.*)/## $1/' /etc/auto_master