All of lore.kernel.org
 help / color / mirror / Atom feed
* autofs5: unable to locate ldap master map
@ 2006-06-28  9:59 Guillaume Rousse
  2006-06-29  4:09 ` Ian Kent
  0 siblings, 1 reply; 21+ messages in thread
From: Guillaume Rousse @ 2006-06-28  9:59 UTC (permalink / raw)
  To: autofs mailing list

I just tested autofs5 (beta5), and I'm a bit confused about using
LDAP-defined master map... Especially when eveything worked out of the
box with autofs 4 :)

First, how the master map is located is still a bit obscure for me...
From the man page, it seems they are two different way to find it:
- file based
- nss based
The first occurs when automount argument or default value for this
argument is an explicit filename, the second occurs otherwise

nss-based master map lookup use the line 'automount' in
/etc/nsswitch.conf, and may use at least the following values (from
autofs4 init script):
- file
- ldap
- nis

Explanations about how behave each of those option is missing, but I
expect ldap value to behave as previously, meaning automagically using
openldap libraries.

So, to use a an ldap master map, I could either
1) used file-based master map lookup, by using "/usr/sbin/automount
/etc/autofs/auto.master" (or just "/usr/sbin/automount" as it is the
default value), and insert something as:
+ldap:ou=auto.master,ou=autofs,dc=village,dc=inria,dc=fr

2) using nss-based master map lookup, by using "/usr/sbin/automount
name-without-path", and insert a "ldap" value in "automount" line in
"/etc/nsswitch.conf"

However, the only way I found to force nss-based master map lookup was
"/usr/sbin/automount +auto.master" (where description says: name has no
 path), or to add +auto.master in auto.master file (where documentation
says: + [map-type,format:]map[options]) and use file-based lookup.

Second, searching master map in ldap doesn't work either, and I'm unable
to understand why:
- what is supposed to happen in the absence of autofs_ldap_auth.conf ?
- what are configuration options available there, beyond the one given
in example (ssl or just tls, for instance) ?
- what are precedence with system configuration for openldap libraries ?
- are the various variables defined in /etc/sysconfig/autofs mandatory,
or are they just alternate default values ?
- are they supposed to be exported in environment before launching
automount, passed to it through a bunch of -Dkey=value ?

The only hints I was able to collect were those error messages in the logs:
Jun 28 11:45:13 alceste automount[4191]: get_server_SASL_mechanisms: No
SASL authentication mechanisms are supported by the LDAP server.
Jun 28 11:45:13 alceste automount[4191]: lookup_init: lookup(ldap):
cannot initialize auth setup

If this matter, I build autofs with --with-mapdir=/etc/autofs as
argument, on x86_64 running mandriva cooker. And i'm running a 2.6.17
kernel.

Thanks for your help.
-- 
Guillaume Rousse
Projet Estime, INRIA
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex - France

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: autofs5: unable to locate ldap master map
@ 2006-08-25  9:03 Piete Brooks, Piete.Brooks--autofs
  2006-08-25 11:15 ` Ian Kent
  0 siblings, 1 reply; 21+ messages in thread
From: Piete Brooks, Piete.Brooks--autofs @ 2006-08-25  9:03 UTC (permalink / raw)
  To: Guillaume Rousse; +Cc: autofs mailing list

> 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 :-((

>> 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?

>> 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)

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: autofs5: unable to locate ldap master map
@ 2006-08-25 11:14 Piete Brooks, Piete.Brooks--autofs
  2006-08-25 11:26 ` Ian Kent
  0 siblings, 1 reply; 21+ messages in thread
From: Piete Brooks, Piete.Brooks--autofs @ 2006-08-25 11:14 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs mailing list

> Complains about doing too many queries to the server is why it's this way.

Fine -- I can live with a single lookup.

> For people with large maps trying all three schema would be a killer.

As a naive LDAP user, I assumed that such a simple request would be trivial :-(

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-08-25 11:26 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28  9:59 autofs5: unable to locate ldap master map Guillaume Rousse
2006-06-29  4:09 ` Ian Kent
2006-06-29 11:17   ` Guillaume Rousse
2006-06-29 12:59     ` Ian Kent
2006-06-30  8:40       ` Guillaume Rousse
2006-07-01 19:11         ` Ian Kent
2006-07-03 13:53           ` Guillaume Rousse
2006-07-03 16:15             ` Ian Kent
2006-07-03 16:30               ` Ian Kent
2006-07-05 12:53               ` Jeff Moyer
2006-07-26  8:13               ` Guillaume Rousse
2006-08-23 14:55                 ` Guillaume Rousse
2006-08-24 14:49                   ` Guillaume Rousse
2006-08-25  5:53                     ` Piete.Brooks--autofs
2006-08-25  7:27                       ` Guillaume Rousse
2006-08-25 11:10                       ` Ian Kent
2006-08-23 13:43       ` Guillaume Rousse
  -- strict thread matches above, loose matches on Subject: below --
2006-08-25  9:03 Piete Brooks, Piete.Brooks--autofs
2006-08-25 11:15 ` Ian Kent
2006-08-25 11:14 Piete Brooks, Piete.Brooks--autofs
2006-08-25 11:26 ` Ian Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.