Authenticating against active directory using python + ldap

后端 未结 11 1095
孤街浪徒
孤街浪徒 2020-11-28 17:48

How do I authenticate against AD using Python + LDAP. I\'m currently using the python-ldap library and all it is producing is tears.

I can\'t even bind to perform a

11条回答
  •  误落风尘
    2020-11-28 18:26

    if you have Kerberos installed and talking to AD, as would be the case with, say, Centrify Express installed and running, you might just use python-kerberos. E.g.

    import kerberos
    kerberos.checkPassword('joe','pizza','krbtgt/x.pizza.com','X.PIZZA.COM')`
    

    would return True a user 'joe' has password 'pizza' in the Kerberos realm X.PIZZA.COM. (typically, I think, the latter would be the same as the name of the AD Domain)

提交回复
热议问题