Distinguished name problem
Michael Ströder
michael at stroeder.com
Mon Feb 16 11:56:07 CET 2009
Fredrik Melander wrote:
> From the command line (ldapsearch) I've got no problem becoming whatever
> I want. The python-ldap module on the other hand gives me *almost*
> anything I want. The only thing that I seem to not be able to get is the
> DN.
The 2-tuples returned by ldap_search_s() etc. are (dn,entry) where entry
is the dictionary {attrtype:[attrvalues]} and dn is simply a binary
string containing the entry's distinguished name.
See also:
http://python-ldap.sourceforge.net/doc/html/ldap.html#example
> The documentation makes a somewhat cryptic reference to a function
> called ldap_get_dn().
Which documentation? ldap_get_dn() is part of the underlying libldap and
you don't have to mess with that yourself.
Ciao, Michael.
More information about the python-ldap
mailing list