[Pkg-openldap-devel] Bug#678191: /usr/bin/ldapsearch: Error - Could not parse LDAP URI

Fabiano Xavier Pires fxp at ig.com.br
Tue Jun 19 20:00:55 UTC 2012


Subject: /usr/bin/ldapsearch: Error - Could not parse LDAP URI
Package: ldap-utils
Version: 2.4.23-7.2
File: /usr/bin/ldapsearch
Severity: normal

While trying to debug Apache2 LDAP Auth (Debian 6 ) I found this:
"ldapsearch -H" can't parse ldap URLs that have baseDn info  even the ones
created by ldapurl.

LDAP Host: master.example.org (172.20.100.120).
baseDN: dc=example,dc=org

DNS is OK, ping master.example.org resolves successfully. Asides, the error
shows when use the server IP too.

ldapsearch -x -H "ldap://172.20.100.120/dc=example,dc=org"
Could not parse LDAP URI(s)=ldap://172.20.100.120/dc=example,dc=org (3)

ldapsearch -x -H "ldap://master.example.org/dc=example,dc=org"
Could not parse LDAP URI(s)=ldap://master.example.org/dc=example,dc=org (3)

ldapsearch -x  -b "dc=example,dc=org" -H "ldap://master.example.org/"
(works ok!)

ldapsearch -x -h master.example.org -b "dc=example,dc=org"
(works ok!)

Using ldapurl to create the URI, with the data from previous (working)
command:
ldapurl -h master.example.org -b "dc=example,dc=org"
returns this: ldap://master.example.org:389/dc=example,dc=org

last try: redirect output of ldapurl directly to ldapsearch -H:
ldapsearch -x -H $(ldapurl -h master.example.org -b "dc=example,dc=org")
Could not parse LDAP URI(s)=ldap://master.example.org:389/dc=example,dc=org(3)
(same error)

PS: The error is in other Debian 6 system (no graphic, ssh only). I can
provide
more info if is needed. BTW, apache auth is working, using the very same URL
returned by ldapurl command.




-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=pt_BR.utf8, LC_CTYPE=pt_BR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ldap-utils depends on:
ii  libc6                   2.11.3-3         Embedded GNU C Library: Shared
lib
ii  libgnutls26             2.8.6-1+squeeze2 the GNU TLS library - runtime
libr
ii  libldap-2.4-2           2.4.23-7.2       OpenLDAP libraries
ii  libsasl2-2              2.1.23.dfsg1-7   Cyrus SASL - authentication
abstra

Versions of packages ldap-utils recommends:
ii  libsasl2-modules          2.1.23.dfsg1-7 Cyrus SASL - pluggable
authenticat

ldap-utils suggests no packages.

-- no debconf information
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-openldap-devel/attachments/20120619/b0dd53f6/attachment.html>


More information about the Pkg-openldap-devel mailing list