Skip to contentSkip to conversation

Help with ldap + autofs please

DISCUSSION Neal Becker 3 participants 9 messages Mar 18, 2004 – Mar 26, 2004 Kernel automounter

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can anyone help me with migrating autofs to ldap?

To test, I added this line to /etc/auto.master:

/test   ldap:rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=comÂ

Here is the corresponding ldif:
dn: nisMapName=auto.test,dc=adg,dc=hns,dc=com
objectClass: top
objectClass: nisMap
nisMapName: auto.test

dn: cn=test,nisMapName=auto.test,dc=adg,dc=hns,dc=com
objectClass: nisObject
cn: test
nisMapEntry:    rpppc1.md.hns.com:/disk1/test
nisMapName: auto.test

If I do /sbin/service autofs reload, I get:

Mar 18 09:19:40 rpppc1 automount[19312]: starting automounter version 4.1.0,
path = /test, maptype = ldap, mapname =
rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=com
Mar 18 09:19:40 rpppc1 automount[19312]: using kernel protocol version 4.00
Mar 18 09:19:40 rpppc1 automount[19312]: using timeout 300 seconds; freq 75
secs
Mar 18 09:19:40 rpppc1 automount[19312]: lookup(ldap): query failed for
(&(objectclass=nisObject))
Mar 18 09:19:40 rpppc1 automount[19312]: lookup(ldap): query failed for
(&(objectclass=automount))
Mar 18 09:19:40 rpppc1 automount[19312]: failed to load map, exiting
Mar 18 09:19:40 rpppc1 automount[19312]: failed to remove dir @ $(J`S (BI -

§f: No such file or directory -A

(Yes, the garbage characters are there in the log) -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAWcvYMDqogpR5tkMRArIuAKCDCsCk/iYysbHdnkKyYv72+HgXzACaAp4Z BzDuH2wgqXHKnyFiGAFiEgA=
=yazv
-----END PGP SIGNATURE-----

maintainer
#1 lore raw
Quoted 8 lines · Neal Becker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can anyone help me with migrating autofs to ldap?

To test, I added this line to /etc/auto.master:

/test   ldap:rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=comÂ

Try

/test ldap //rpppc1.md.hns.com/ou=auto.test,dc=adg,dc=hns,dc=com

Quoted 27 lines

Here is the corresponding ldif:
dn: nisMapName=auto.test,dc=adg,dc=hns,dc=com
objectClass: top
objectClass: nisMap
nisMapName: auto.test

dn: cn=test,nisMapName=auto.test,dc=adg,dc=hns,dc=com
objectClass: nisObject
cn: test
nisMapEntry:    rpppc1.md.hns.com:/disk1/test
nisMapName: auto.test

If I do /sbin/service autofs reload, I get:

Mar 18 09:19:40 rpppc1 automount[19312]: starting automounter version 4.1.0,
path = /test, maptype = ldap, mapname =
rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=com
Mar 18 09:19:40 rpppc1 automount[19312]: using kernel protocol version 4.00
Mar 18 09:19:40 rpppc1 automount[19312]: using timeout 300 seconds; freq 75
secs
Mar 18 09:19:40 rpppc1 automount[19312]: lookup(ldap): query failed for
(&(objectclass=nisObject))
Mar 18 09:19:40 rpppc1 automount[19312]: lookup(ldap): query failed for
(&(objectclass=automount))
Mar 18 09:19:40 rpppc1 automount[19312]: failed to load map, exiting
Mar 18 09:19:40 rpppc1 automount[19312]: failed to remove dir @ $(J`S (BI -
Quoted 3 lines

§f: No such file or directory -A

(Yes, the garbage characters are there in the log)

Garbage chars fixed in 4.1.1.

Also if you use

/test ldap //rpppc1.md.hns.com/ou=auto.test,dc=adg,dc=hns,dc=com --debug

with 4.1.1 you will get more info in wherever you log debug output (/var/log/debug.log in RedHat).

Ian

#2 lore raw
Quoted 11 lines · On Mar 21 Ian Kent wrote:
Quoted 5 lines · Neal Becker

Can anyone help me with migrating autofs to ldap?

To test, I added this line to /etc/auto.master:

/test   ldap:rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=com

Try

/test ldap //rpppc1.md.hns.com/ou=auto.test,dc=adg,dc=hns,dc=com

Hi, I get the same problem--this doesn't help (a space after "ldap" makes it think it's a yp map called "ldap").

Quoted 3 lines
Quoted 3 lines
Mar 18 09:19:40 rpppc1 automount[19312]: lookup(ldap): query failed for (&(objectclass=nisObject))
Mar 18 09:19:40 rpppc1 automount[19312]: lookup(ldap): query failed for (&(objectclass=automount))
Mar 18 09:19:40 rpppc1 automount[19312]: failed to load map, exiting

Same problem here.

Mar 24 16:26:22 r2-pc automount[16114]: starting automounter version 4.1.1, path = /homes, maptype = ldap, mapname = ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk
Mar 24 16:26:22 r2-pc automount[16114]: lookup(ldap): server = "(default)", port = 389, base dn = "ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk"
Mar 24 16:26:23 r2-pc automount[16114]: mount(bind): bind_works = 1
Mar 24 16:26:23 r2-pc automount[16114]: kproto sub: Function not implemented
Mar 24 16:26:23 r2-pc automount[16114]: using kernel protocol version 4.00
Mar 24 16:26:23 r2-pc automount[16114]: using timeout 300 seconds; freq 75 secs
Mar 24 16:26:23 r2-pc automount[16114]: lookup(ldap): searching for "(&(objectclass=nisObject))" under "ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk"
Mar 24 16:26:23 r2-pc automount[16114]: lookup(ldap): query succeeded, no matches for (&(objectclass=nisObject))
Mar 24 16:26:24 r2-pc automount[16114]: lookup(ldap): searching for "(&(objectclass=automount))" under "ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk"
Mar 24 16:26:24 r2-pc automount[16114]: lookup(ldap): query failed for (&(objectclass=automount))
Mar 24 16:26:24 r2-pc automount[16114]: failed to load map, exiting
Mar 24 16:26:24 r2-pc automount[16114]: umount_multi: path=/homes incl=0
# ldapsearch -x '(&(objectclass=automount))' -b 'ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk' -z 3
# extended LDIF
#
# LDAPv3
# base <ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk> with scope sub
# filter: (&(objectclass=automount))
# requesting: ALL
#

# tba1, auto.homes, dcs.qmul.ac.uk
dn: cn=tba1,ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk
cn: tba1
objectClass: automount
automountInformation:: Oi9ob21lL2N1c3RhcmQvM3JkL3RiYTE=

# shc5, auto.homes, dcs.qmul.ac.uk
dn: cn=shc5,ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk
cn: shc5
objectClass: automount
automountInformation:: Oi9ob21lL2N1c3RhcmQvbXNjaXQvc2hjNQ==

# ozm2, auto.homes, dcs.qmul.ac.uk
dn: cn=ozm2,ou=auto.homes,dc=dcs,dc=qmul,dc=ac,dc=uk
cn: ozm2
objectClass: automount
automountInformation:: Oi9ob21lL2N1c3RhcmQvbXNjaXQvb3ptMg==

# search result
search: 2
result: 4 Size limit exceeded

# numResponses: 4
# numEntries: 3

This is using autofs-4.1.1-3 from Fedora development (will probably go in FC2), with either the v3 or v4 kernel module.

Strangely, some mounts do work and others do not. There's not enough in the debug log for me to work out what's going on.

I now have no home directory! Can anyone see what's gone wrong?

maintainer
#3 lore raw
Quoted 8 lines · Matt Bernstein
Quoted 6 lines · On Mar 21 Ian Kent wrote:
Quoted 4 lines · Neal Becker

Can anyone help me with migrating autofs to ldap?

To test, I added this line to /etc/auto.master:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

/test   ldap:rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=com

Try

/test ldap //rpppc1.md.hns.com/ou=auto.test,dc=adg,dc=hns,dc=com

Hi, I get the same problem--this doesn't help (a space after "ldap" makes it think it's a yp map called "ldap").

OK. My mistake.

Doesn't look to good.

I'll run up a Fedora install on the weekend and try to duplicate it.

Ian

maintainer
#4 lore raw
In reply to Neal Becker
Quoted 4 lines · Neal Becker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can anyone help me with migrating autofs to ldap?

Think so. Ive checked the Fedora package out and ...

Quoted 4 lines

To test, I added this line to /etc/auto.master:

/test   ldap:rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=com

I see Jeff has added a patch to handle this syntax. I like it, I'm going to add it to 4.1.2.

But

/test ldap://rpppc1.md.hns.com/ou=auto.test,dc=adg,dc=hns,dc=com

				 ^^

should also work. However there seems to be an inconsistency with the dn

Quoted 3 lines

Here is the corresponding ldif:
dn: nisMapName=auto.test,dc=adg,dc=hns,dc=com

here ^^^^^^^^^^

So

/test ldap:rpppc1.md.hns.com:nisMapName=auto.test,dc=adg,dc=hns,dc=com

should work.

Let me know how you go with this.

Ian

#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 28 lines · Ian Kent
Quoted 4 lines · Neal Becker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can anyone help me with migrating autofs to ldap?

Think so. Ive checked the Fedora package out and ...

Quoted 3 lines

To test, I added this line to /etc/auto.master:

/test   ldap:rpppc1.md.hns.com:ou=auto.test,dc=adg,dc=hns,dc=com

I see Jeff has added a patch to handle this syntax. I like it, I'm going to add it to 4.1.2.

But

/test ldap://rpppc1.md.hns.com/ou=auto.test,dc=adg,dc=hns,dc=com

				 ^^

should also work. However there seems to be an inconsistency with the dn

Quoted 2 lines

Here is the corresponding ldif:
dn: nisMapName=auto.test,dc=adg,dc=hns,dc=com

here ^^^^^^^^^^

So

Quoted 7 lines

/test ldap:rpppc1.md.hns.com:nisMapName=auto.test,dc=adg,dc=hns,dc=com

should work.

Let me know how you go with this.

Ian

This one is working:
/test ldap://rpppc1.md.hns.com/nisMapName=auto.test,dc=adg,dc=hns,dc=com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAYzmjMDqogpR5tkMRAvV8AJ4pj+89qapSnbcxwbMn0vaZK3h3HQCfRZXG ymCQAbmBdje3BfUSt2id580=
=vTMf
-----END PGP SIGNATURE-----

maintainer
#6 lore raw
Quoted 8 lines · Neal Becker
Quoted 5 lines

/test ldap:rpppc1.md.hns.com:nisMapName=auto.test,dc=adg,dc=hns,dc=com

should work.

This one is working:
/test ldap://rpppc1.md.hns.com/nisMapName=auto.test,dc=adg,dc=hns,dc=com

Does that mean we need to review the patch that should allow the colon syntax?

#7 lore raw
Quoted 10 lines · Ian Kent
Quoted 6 lines · Neal Becker
Quoted 3 lines

/test ldap:rpppc1.md.hns.com:nisMapName=auto.test,dc=adg,dc=hns,dc=com

should work.

This one is working:
/test ldap://rpppc1.md.hns.com/nisMapName=auto.test,dc=adg,dc=hns,dc=com

Does that mean we need to review the patch that should allow the colon syntax?

Not sure what you mean by "review the patch", but I don't personally care which syntax is used. The problem I found was it was really hard to find anywhere that the correct syntax was documented. A simple example would have saved me a lot of time.

maintainer
#8 lore raw
Quoted 9 lines · Neal Becker
Quoted 8 lines · Ian Kent
Quoted 6 lines · Neal Becker
Quoted 3 lines

/test ldap:rpppc1.md.hns.com:nisMapName=auto.test,dc=adg,dc=hns,dc=com

should work.

This one is working:
/test ldap://rpppc1.md.hns.com/nisMapName=auto.test,dc=adg,dc=hns,dc=com

Quoted 8 lines
Quoted 2 lines

Does that mean we need to review the patch that should allow the colon syntax?

Not sure what you mean by "review the patch", but I don't personally care which syntax is used. The problem I found was it was really hard to find anywhere that the correct syntax was documented. A simple example would have saved me a lot of time.

Cool. I'll include an example in 4.1.2.

automount(8) does describe the format of the server and dn but what the master map entry should be is not clear.