Authenticating to Active Directory with python-ldap always returns (97, [])

后端 未结 2 1898
无人共我
无人共我 2021-02-01 08:41

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).

<
2条回答
  •  礼貌的吻别
    2021-02-01 09:10

    This error means that your conn.set_option(ldap.OPT_REFERRALS, 0) isn't being affected.

    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')
    

提交回复
热议问题