Skip to contentSkip to conversation

autofs5: unable to locate ldap master map

DISCUSSION Piete Brooks 2 participants 2 messages Aug 25, 2006 Kernel automounter

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

Do you really have an use to be able to define your ldap connection settings in a file named differently from "autofs_ldap_auth.conf" ?

Sorry -- misunderstood :-((

Quoted 3 lines
Quoted 2 lines

PS: LDAP failed for me too until I edited /etc/sysconfig/autofs to use the correct schema -- now it works fine!

Even without configuring the top dn explicitely ?

I believe that to be the case.
I have been HACKing away to get it working, but I don't think I set it anywhere.
The change to the schema in /etc/sysconfig/autofs ws the bit which made it work, and that has no full name:

DEFAULT_MAP_OBJECT_CLASS="automountMap"
DEFAULT_ENTRY_OBJECT_CLASS="automount"
DEFAULT_MAP_ATTRIBUTE="ou"
DEFAULT_ENTRY_ATTRIBUTE="cn"
DEFAULT_VALUE_ATTRIBUTE="automountInformation"

Comparing the failing and working entries I have:

Aug 25 06:36:04 pbtest8 automount[32611]: do_connect: lookup(ldap): ldap 
anonymous bind returned 0
Aug 25 06:36:04 pbtest8 automount[32611]: get_query_dn: lookup(ldap): query 
succeeded, no matches for (&(objectclass=nisMap)(nisMapName=auto.master))
Aug 25 06:36:04 pbtest8 automount[32611]: unbind_ldap_connection: use_tls: 0

vs

Aug 25 06:51:23 pbtest8 automount[32657]: do_connect: lookup(ldap): ldap 
anonymous bind returned 0
Aug 25 06:51:23 pbtest8 automount[32657]: get_query_dn: lookup(ldap): query dn 
ou=auto.master,dc=cl,dc=cam,dc=ac,dc=uk
Aug 25 06:51:23 pbtest8 automount[32657]: unbind_ldap_connection: use_tls: 0

so my guess is that the "(&(objectclass=automountMap)(ou=auto.master))" worked (shame it only reports the search if it fails) and returned "ou=auto.master,dc=cl,dc=cam,dc=ac,dc=uk" -- that's what ldapsearch does:

ivatt:~: ldapsearch -LLL -x "(&(objectclass=automountMap)(ou=auto.master))"
dn: ou=auto.master,dc=cl,dc=cam,dc=ac,dc=uk
objectClass: top
objectClass: automountMap
automountMapName: auto.master
ou: auto.master

ivatt:~:

What does your debug say just after "ldap anonymous bind returned 0"? Do you have base set correctly?

Quoted 3 lines
Quoted 1 line

Any chance of it it defaulting to try the three example schemas?

Which would means having multiple default values for a configuration directive that only accept one... It may be practical, but rather messy.

OK -- put it down to a "simplistic user view of the problem" :-( I was thinking you could do something equiv to

(|(&(objectclass=automountMap)(ou=auto.master))
(&(objectclass=nisMap)(nisMapName=auto.master))
)

but I suspect I'm missing the actual workings of LDAP (e.g. where the value is)

maintainer
#1 lore raw
Quoted 7 lines · Piete Brooks

OK -- put it down to a "simplistic user view of the problem" :-( I was thinking you could do something equiv to

(|(&(objectclass=automountMap)(ou=auto.master))
(&(objectclass=nisMap)(nisMapName=auto.master))
)

That query would work but then we would no be able to use arbitary schema in the configuration.

Ian