Similar to this question, I am trying to perform simple authentication to a 2003 Active Directory using python ldap (CentOS 6.2 x86_64, Python 2.6.6, python-ldap 2.3.10).
This error means that your conn.set_option(ldap.OPT_REFERRALS, 0) isn't being affected.
conn.set_option(ldap.OPT_REFERRALS, 0)
Therefore, try this:
import ldap ldap.set_option(ldap.OPT_REFERRALS,0) ldap.protocol_version = 3 conn = ldap.initialize('ldap://....') conn.simple_bind_s('user@domain.com', 'RightPassword')