python-ldap: searching without specifying an OU?

Michael Ströder michael at
Wed Apr 23 23:40:37 CEST 2008

hotani wrote:
> This fixed it!
> By adding this line after 'import ldap', I was able to search from the
> root level:
> ldap.set_option(ldap.OPT_REFERRALS, 0)

Uumh, yes. I'm always switching off OpenLDAP client lib's internal 
referral chasing.

But be prepared to also handle (at least ignore) the search 
continuations (LDAP URL) in the search results you will probably 
receive. These are not regular search entries.

Ciao, Michael.

More information about the Python-list mailing list