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

Re: OpenLDAP and DNS SRV records



Pierangelo Masarati wrote:
Matt Kowske wrote:
Thank you.  could you provide an example of this functionality with
ldapsearch?

ldapsearch -x -v -H "dc%3Ddomain%2Cdc%3Dcom" -b "CN=Users,DC=domain,DC=com"
-D "CN=Matt Kowske,CN=Users,DC=domain,DC=com" -W "samaccountname=mkowske"


Could not parse LDAP URI(s)=dc%3Ddomain%2Cdc%3Dcom (3)

This is ldap version 2.4.11. I (tried) to look at the code, and and found
the section of code in common.c where it is erroring out, but couldn't
determine much beyond that. Why is the above not being recognized as a DN?
It should not be parsed as a URI according to the man page.

The man page says: "if no host/port is specified, but a DN is...". It means that:


- you must provide a(n RFC 45) LDAP URI

RFC 4516 :)


- it must contain no host/port

- it must contain a DN

yours is not a LDAP URI.  Try something like "ldap:///dc=domain,dc=com";.

The 2.4 client tools have been modified to support this feature. However, they use libldap to perform this. See clients/tools/common.c, the calls to ldap_dn2domain(3) and ldap_domain2hostlist(3) calls (I don't think they actually have a man page...). Those calls are available in libldap since 2.0, I believe, in 2000.

p.




Ing. Pierangelo Masarati OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------