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

Re: autofs and OpenLDAP integration



GREAT !!

it works:

Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.3-12 on an i686
login: doucet
Password:
Last login: Tue Jul 24 10:34:36 from openldap
csh-2.04$
csh-2.04$
csh-2.04$ pwd
/mci/em/doucet

Jul 24 10:34:36 openldap login(pam_unix)[4803]: session opened for user
doucet by (uid=0)
Jul 24 10:34:36 openldap automount[4698]: attempting to mount entry
/mci/em
Jul 24 10:34:36 openldap automount[4805]: starting automounter version
3.1.7, path = /mci/em, maptype = ldap, mapname =
ou=auto.mci.em,dc=int-evry,dc=fr
Jul 24 10:34:36 openldap automount[4805]: using kernel protocol version
3
Jul 24 10:34:36 openldap automount[4805]: attempting to mount entry
/mci/em/doucet
Jul 24 10:34:36 openldap  -- doucet[4803]: LOGIN ON pts/9 BY doucet FROM
openldap


Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.3-12 on an i686
login: procacci
Password:
Last login: Tue Jul 24 10:30:50 from openldap
openldap.int-evry.fr:/mci/mci/procacci>

Jul 24 10:33:21 openldap login(pam_unix)[4706]: session opened for user
procacci by (uid=0)
Jul 24 10:33:21 openldap automount[4698]: attempting to mount entry
/mci/mci
Jul 24 10:33:21 openldap automount[4708]: starting automounter version
3.1.7, path = /mci/mci, maptype = ldap, mapname =
ou=auto.mci.mci,dc=int-evry,dc=fr
Jul 24 10:33:21 openldap automount[4708]: using kernel protocol version
3
Jul 24 10:33:21 openldap automount[4708]: attempting to mount entry
/mci/mci/procacci
Jul 24 10:33:25 openldap  -- procacci[4706]: LOGIN ON pts/7 BY procacci
FROM openldap

ONE LAST QUESTION (arg !!), can I move /etc/auto.master in ldap

Follows the complete configuration to make it works (that might be a
good resume for others ...)

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

$more /etc/openldap/ldap.conf
HOST openldap.int-evry.fr
BASE dc=int-evry,dc=fr

$/etc/init.d/autofs status
Configured Mount Points:
------------------------
/usr/sbin/automount /mci ldap
openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr

Active Mount Points:
--------------------
/usr/sbin/automount /mci ldap
openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr
/usr/sbin/automount --submount /mci/mci ldap
ou=auto.mci.mci,dc=int-evry,dc=fr
/usr/sbin/automount --submount /mci/em ldap
ou=auto.mci.em,dc=int-evry,dc=fr

Here is the ldif file that works

# 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 causes autofs to start up another automounter on /mci/em.
dn: cn=em,ou=auto.mci,dc=int-evry,dc=fr
objectClass: top
objectClass: automount
description: em home directories
cn: em
automountInformation: -fstype=autofs
ldap:ou=auto.mci.em,dc=int-evry,dc=fr

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

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


# 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: /
automountInformation: -rw,intr,soft,quota nfsserver:/user2000/mci/&

Even BETTER: include auto.master in ldap, no more /etc/auto.master.

for the configuration above, here's what I add:

dn: ou=auto.master,dc=int-evry,dc=fr
objectClass: top
objectClass: automountMap
ou: auto.master

dn: cn=/mci, ou=auto.master,dc=int-evry,dc=fr
objectClass: automount
automountInformation:
ldap:openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr
-rw,intr,soft,quota
cn: /mci

$grep automount /etc/nsswitch.conf
automount: ldap

$/etc/init.d/autofs status
Configured Mount Points:
------------------------
/usr/sbin/automount /mci ldap
openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr -rw,intr,soft,quota

Active Mount Points:
--------------------
/usr/sbin/automount /mci ldap
openldap.int-evry.fr:ou=auto.mci,dc=int-evry,dc=fr -rw,intr,soft,quota
/usr/sbin/automount --submount /mci/mci ldap
ou=auto.mci.mci,dc=int-evry,dc=fr
/usr/sbin/automount --submount /mci/em ldap
ou=auto.mci.em,dc=int-evry,dc=fr

And it Works !

Thanks a lot to everyone for your help on this.

Nalin Dahyabhai wrote:
> 
> On Mon, Jul 23, 2001 at 01:54:09PM +0200, Jehan PROCACCIA wrote:
> > I changed latest line with :
> >
> > automountInformation: -fstype=autofs
> > ldap:ou=auto.mci.mci,dc=int-evry,dc=fr
> >
> > Here's the ldap keyword is used and not the hostname of the ldap server
> > (Am I right ?) Any way  I hadn't anymore the library problem now.
> >
> > however doesn't mount the homedir either :-(
> >
> > here's what logs says:
> >
> > Jul 23 12:15:25 openldap automount[1651]: lookup(ldap): couldn't connect
> > to (null)
> > Jul 23 12:15:25 openldap automount[1650]: mount(autofs): sub automount
> > returned status 0x100
> >
> > Again to avoid confusion I simplified the problem, now I tried to mount
> > the homedir /mci/em/doucet of user doucet (/mci/mci for procacci could
> > give confusion with the mci key followed by mci subdirectory ...)
> 
> You're not specifying an LDAP server in the map specification, so the
> lookup module is assuming that you've set a default somewhere.
> 
> OpenLDAP lets you set a default server in /etc/openldap/ldap.conf using
> the HOST configuration option, but it looks like you don't have one set
> there, so the lookup module doesn't know which server to connect to.
> 
> You'll either need to set one in ldap.conf, or (as Philip has noted)
> specify a server in your map specification, like this:
> ldap:openldap.int-evry.fr:ou=auto.mci.mci,dc=int-evry,dc=fr
> 
> Cheers,
> 
> 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