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

Re: a quick question



At 04:17 PM 6/30/00 -0700, Terry Lambert wrote:
>> Actually, LDAPv2 provide any discovery mechanism.   And
>> with LDAPv3, you likely would have to prompt the user to
>> select one of many values of the root DSE's namingContext
>> attribute (assuming it was readable)... and even then, these
>> may not be the appropriate base DNs for general use.
>
>Actually, this was the first real LDAP question that I
>asked: how to get the base DN on an LDAPv2 server.  I
>got this answer from Gordon Good:
>
>| For a v2 server, you can try retrieving the entry whose
>| DN is "cn=config", as follows:
>|
>| ldap_search_s( ld, "cn=config", LDAP_SCOPE_BASE,
>|     "(objectclass=*)", attrs, 0, &res );
>|
>| Where "attrs" might be:
>| 
>| char *attrs[] = { "database", NULL };

Gordon said "you can try".  This behavior is specific to U-Mich
LDAP and derived servers (such as OpenLDAP 1.x).  It is not a
feature described in any LDAPv2 specification.   Also note that
you would be discovering the database suffix(es), which may or
may not be what users should use as their base DN.

>PS: We seem to be having a lot of people talking about LDAP
>recently.  It might be worthwhile thinking about creating a
>user group in the Bay area, or at least confiscating a group
>meeting at BayLISA or the FreeBSD or Linux user groups one
>of these days...

Are you volunteering to organize such?  :-)