Linux Autofs with LDAP

nsswitch.conf is automounter: ldap (there is no /etc/auto.master file)

Sample ldif for auto.master and auto.home entries

dn: ou=auto.master, dc=mydom,dc=com
ou: auto.master
objectClass: top
objectClass: automountMap

dn: cn=/home,ou=auto.master, dc=mydom,dc=com
objectClass: automount
automountInformation: ldap:host.mydom.com:ou=auto.home,dc=mydom,dc=co
 m --timeout 60
cn: /home

dn: ou=auto.home, dc=mydom,dc=com
ou: auto.home
objectClass: top
objectClass: organizationalUnit

dn: cn=user1,ou=auto.home, dc=mydom,dc=com
objectClass: automount
automountInformation: -rw,hard,intr host:/export/home/user1
cn: user1

In this senario, when the automounter starts, it will parse the nsswitch.conf file. Since our entry contains ldap it will search the base dn specified in the /etc/ldap.conf file for the objectClass: automount with the ou=auto.master and use the automountinformation entry as a pointer to rest of the mount information as in the sample ldif above.

More Information#

There might be more information for this subject on one of the following: