我想使用现有的Active Directory系统进行用户身份验证,但存在问题。Django LDAP Active Directory
这工作:
ldapsearch -D "[email protected]" -x -w PASSWORD -b "OU=users,OU=otdel,DC=dom,DC=comp,DC=local" -h x.x.x.x
我应该在哪里输入用户名以连接到AD?
AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
AUTH_LDAP_BIND_DN = ???
AUTH_LDAP_BIND_PASSWORD = "PASSWORD"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,ou=otdel,dc=dom,dc=comp,dc=local", ldap.SCOPE_SUBTREE, "(cn=%(user)s)")
你使用Python 2还是Python 3?你使用哪个Python包进行LDAP,哪些用于Django LDAP? – FlipperPA