python-ldap vs. Active directory

Michael Ströder michael at
Sun May 22 00:26:00 CEST 2005

Deepak Giridharagopal wrote:
> On Thu, 2005-05-19 at 15:24 -0700, Sean O'Connell wrote:
>>The results are invariably:
>>initializing ..
>>binding ..
>>Sucessfully bound to AD
>>searching ..
>>{'info': '00000000: LdapErr: DSID-0C0905FF, comment: In order to perform
>>this operation a successful bind must be completed on the connection.,
>>data 0, vece', 'desc': 'Operations error'}
> I was getting the exact same error. I fixed the problem by explicitly
> disabling referral chasing in the OpenLDAP client libraries (for my
> purposes, I didn't care about referrals). 
> Before you call ldap.initialize, try:
> ldap.set_option(ldap.OPT_REFERRALS, 0)

This is good advice since IIRC the OpenLDAP libs chase referrals doing
an anonymous bind. Therefore it's definitely better to get the search
references (check the result type). Sort them out or chase the referrals
in your Python application.

Ciao, Michael.

More information about the python-ldap mailing list