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

Re: autofs and OpenLDAP integration



thanks a lot for the ldif file !.

I don't have any error reported now !, but it still doesn't work !? (I
had to change the hostname from ldap to openldap to avoid confusion (for
me) from hostname and "ldap" key word)

$more /etc/auto.master
#/mci ldap:openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr
/mci ldap:openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr
--timeout=60

$/etc/init.d/autofs start
Starting automount:                                        [  OK  ]

log says:
jui 19 14:20:33 openldap autofs: autofs startup succeeded

[root@openldap ~]
$/etc/init.d/autofs status
Configured Mount Points:
------------------------

Active Mount Points:
--------------------

Nothing visible from the active mount point !

Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.3-12 on an i686
login: procacci
Password:
Last login: Thu Jul 19 10:58:43 from openldap
No directory /mci/mci/procacci!
Logging in with home = "/".
ksh-2.04$

log doesn't show any error now ! but no home dir !?

Jul 19 14:22:27 openldap login(pam_unix)[19346]: session opened for user
procacci by (uid=0)
Jul 19 14:22:27 openldap  -- procacci[19346]: LOGIN ON pts/5 BY procacci
FROM openldap

Here's the ldif I inserted in ldap , this is the one you kindly wrote
for me, I just changed the name of the ldap server from ldap to openldap
to ovoid confusion with the "ldap" key work. I also had to add "cn: /"
in the last entrie, because ldapadd told me:

adding new entry "cn=/,ou=auto.mci.mci,dc=int-evry,dc=fr"
ldap_add: Object class violation
 additional info: missing required attribute

I presume it was the right thing to do ?

# This entry is more or less a place-holder for automount entries for
# directories which get mounted under /mci.
dn: ou=auto.mci,dc=int-evry,dc=fr
objectClass: top
objectClass: organizationalUnit
ou: auto.mci

# This entry causes autofs to start up another automounter on /mci/mci.
dn: cn=mci,ou=auto.mci,dc=int-evry,dc=fr
objectClass: top
objectClass: automount
description: mci home directories
cn: mci
automountInformation: -fstype=autofs
openldap:ou=auto.mci.mci,dc=int-evry,dc=fr

(Here I changed -fstype=autofs ldap: to -fstype=autofs openldap: , I
hope it's fine, this is the hostname not the ldap key word !?)

# This entry is more or less a place-holder for automount entries for
# directories which get mounted under /mci/mci.
dn: ou=auto.mci.mci,dc=int-evry,dc=fr
objectClass: top
objectClass: organizationalUnit
ou: auto.mci.mci

# This entry mounts nfsserver:/user2000/mci/procacci on
/mci/mci/procacci.
dn: cn=procacci,ou=auto.mci.mci,dc=int-evry,dc=fr
objectClass: top
objectClass: automount
description: procacci home directory
cn: procacci
automountInformation: -rw,intr,soft,quota
nfsserver:/user2000/mci/procacci

# This is a wildcard entry for any user whose home directory is under
# /mci/mci (this includes procacci, too).
dn: cn=/,ou=auto.mci.mci,dc=int-evry,dc=fr
objectClass: top
objectClass: automount
description: generic home directory
cn: /

(I've added this required attribute !)

automountInformation: -rw,intr,soft,quota nfsserver:/user2000/mci/&

What I am doing wrong ?

I can forget about the procacci user ( that wasjust a try) 
and have only wildcards like cn:/ and automountInformation:
-rw,intr,soft,quota nfsserver:/user2000/mci/&

Actually I just want to migrate my autofs information from nis which
works fine and looks like:
$ more auto_master
#
# mount-point           mapname         mount-options
#
/mci                    auto.mci        -rw,intr,soft,quota

$ more auto_mci
mci nfsserver:/user2000/&

thanks for your help.


Nalin Dahyabhai wrote:
> 
> On Wed, Jul 18, 2001 at 05:28:23PM +0200, Jehan PROCACCIA wrote:
> 
> The auto.master file gives the automounter control of /mci, and your
> home directory appears to be /mci/mci/procacci.  When you attempt to
> access your home directory, autofs attempts to mount /mci/mci, and
> because there's no matching entry (which would be named
> "cn=mci,ou=automount,dc=int-evry,dc=fr") and no wildcard entry (which
> would be named "cn=/,ou=automount,dc=int-evry,dc=fr"), it fails.
> 
> You have an entry named "dn: cn=procacci,ou=mci,ou=automount,dc=int-evry,dc=fr",
> so I can guess that you're expecting autofs to perform queries for
> subdirectories using this type of syntax, but unfortunately, that's just
> not how it works.  Autofs (at least under Linux) doesn't directly support
> subdirectories, but you can achieve a similar effect using additional
> automount processes.
> 
> For what you want to do, you'll need to set things up so that autofs
> starts another automount process to manage /mci/mci, and have that
> automounter mount the user's home directory.  I'll assume you've got an
> auto.master file which looks like this:
> 
> /mci ldap:ldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr
> 
> The LDIF (assuming the RDN for the automounter running on /mci/mci is
> going to be "ou=auto.mci.mci") would look something like this:
> 
> # This entry is more or less a place-holder for automount entries for
> # directories which get mounted under /mci.
> dn: ou=auto.mci,dc=int-evry,dc=fr
> objectClass: top
> objectClass: organizationalUnit
> ou: auto.mci
> 
> # This entry causes autofs to start up another automounter on /mci/mci.
> dn: cn=mci,ou=auto.mci,dc=int-evry,dc=fr
> objectClass: top
> objectClass: automount
> description: mci home directories
> cn: mci
> automountInformation: -fstype=autofs ldap:ou=auto.mci.mci,dc=int-evry,dc=fr
> 
> # This entry is more or less a place-holder for automount entries for
> # directories which get mounted under /mci/mci.
> dn: ou=auto.mci.mci,dc=int-evry,dc=fr
> objectClass: top
> objectClass: organizationalUnit
> ou: auto.mci.mci
> 
> # This entry mounts nfsserver:/user2000/mci/procacci on /mci/mci/procacci.
> dn: cn=procacci,ou=auto.mci.mci,dc=int-evry,dc=fr
> objectClass: top
> objectClass: automount
> description: procacci home directory
> cn: procacci
> automountInformation: -rw,intr,soft,quota nfsserver:/user2000/mci/procacci
> 
> # This is a wildcard entry for any user whose home directory is under
> # /mci/mci (this includes procacci, too).
> dn: cn=/,ou=auto.mci.mci,dc=int-evry,dc=fr
> objectClass: top
> objectClass: automount
> description: generic home directory
> automountInformation: -rw,intr,soft,quota nfsserver:/user2000/mci/&
> 
> Using these entries, an attempt to access /mci/mci/procacci first triggers
> a lookup for an entry for "mci" in the automounter which is running in the
> /mci directory.  It finds "cn=mci,ou=auto.mci,dc=int-evry,dc=fr", and
> starts up another automounter to manage /mci/mci.
> 
> Your attempt to access /mci/mci/procacci (which was only paused until
> /mci/mci was mounted) then triggers a lookup for an entry for "procacci"
> in the automounter which is running in /mci/mci.  It finds
> "cn=procacci,ou=auto.mci.mci,dc=int-evry,dc=fr".  If you leave that entry
> out of your directory, it falls back to searching for a wildcard entry
> and finds "cn=/,ou=auto.mci.mci,dc=int-evry,dc=fr".
> 
> Either way, it then mounts the home directory using the
> automountInformation attribute of the entry which it found.
> 
> Hopefully this clears things up.
> 
> Nalin

-- 
Jehan Procaccia
Institut National des Telecommunications| Email:
Jehan.Procaccia@int-evry.fr 
MCI, Moyens Communs Informatiques	| Tel  : +33 (0) 160764436 
9 rue Charles Fourier 91011 Evry France | Fax  : +33 (0) 160764321