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

Re: URI Question

Quoting Pierangelo Masarati <ando@sys-net.it>:

If I try
ldapsearch -H ldap://localhost/o=domain.org?uid?sub?(objectclass=*)

The search shows all entries but if I add an ou such as

ldapsearch -H

it gives me
Could not create LDAP session handle for
(-9): Bad parameter to an ldap routine

a -b search with the same ou=people,o=domain.org works fine.

Is the "ou=people,o=domain.org in the URI not the same as -b in a search?

Another problem with the same uri is that with the working search, if
I add an objectclass value, it is ignored.

Everything after <hostport> that is passed to ldapsearch with -H is ignored. This is the intended (and documented) behavior. Use -b <base>, -s <scope>, the <filter> and the <attrlist> arguments as described in ldapsearch(1).

That explains it. Thanks. I was trying to get http://www.rudedog.org/auth_ldap/ for apache to work. It must doing the parsing of the rest. It asks for the above or similar uri. Since I've not been able to get it to work I was trying to test it seperately.

Thanks, again.