[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Purely LDAP-based Automounts



On Tue, 3 Feb 2004, Michael Lackner wrote:

> Hello!
> 
> I've got my OpenLDAP Server readily set up on RedHat9 now.  It's OpenLDAP 2.0.27-8.
> What I'm now trying to achieve is purely LDAP-based automounting of user's home directories.
> 
> I don't want to use /etc/auto.master at all, so i set the automounter to "ldap" in /etc/nsswitch.conf:
> ####
> automount:  ldap
> ####
> auto.master has been renamed to be totally sure of this.
> 
> I'm trying to export the following directory, as you will see in my LDIF files:
> /etc/exports:
> ####
> /exports/home 193.171.81.0/24(rw,no_root_squash,sync)
> ####
> 
> Manually mounting the directories within /exports/home succeeds.
> 
> So, the hairy part seem to be the LDIF files / the data within the directory database. I tried to
> test this on my testserver with a user called "testuser" and with user root, using autofs 3.1.7-36.
> 
> LDIF Data:
> ####
> dn: ou=auto.master,o=ait,c=com
> objectClass: top
> objectClass: automountMap
> ou: auto.master
> ####
> 
> ####
> dn: cn=/home,ou=auto.master,o=ait,c=com
> objectClass: automount
> cn: /home
> automountInformation: ldap 193.171.81.222:ou=auto.home,o=ait,c=com
> ####
> 
> ####
> dn: ou=auto.home,o=ait,c=com
> objectClass: top
> objectClass: automountMap
> ou: auto.home
> ####
> 
> ####
> dn: cn=test,ou=auto.home,o=ait,c=com
> objectClass: automount
> cn: test
> automountInformation: -fstype=nfs,hard,intr,nodev 193.171.81.222:/exports/home/testuser
> ####
> 
> As you can see, "o=ait,c=com" is the base DN. 193.171.81.222 is the IP of my OpenLDAP
> and NFS server.
> 
> When i run "service autofs status" on my client, i can see a directory "/home" being configured
> for automounting, nothing else, but this isn't what i intended. I want autofs to automount
> the directory "test" within "/home" of course ("/home/test" being the homedir of "testuser").

But, there is no reason for autofs to mount any "real" mount points when 
you restart autofs, they should only be mounted (and thus you will see the 
ldap searches from autofs in the logs) when accessed.

Regards,
Buchan