39
你確定你的 DN 是對的? 正常來說 DN 不會是 email 那個格式.
我們用的是類似這樣的設定.
<Location />
AuthName "GIT: Enter AD Username/Password"
AuthType Basic
AuthBasicProvider ldap
AuthLDAPBindDN "CN=git,CN=Users,DC=domain,DC=xxx,DC=org,DC=tw"
AuthLDAPBindPassword "password"
AuthLDAPURL "ldap://ad.domain.xxx.org.tw:3268/DC=domain,DC=xxx,DC=org,DC=tw?sAMAccountName?sub?(objectClass=*)"
#AuthLDAPMaxSubGroupDepth 10
#AuthLDAPSubgroupAttribute member
AuthLDAPSubGroupClass group
#AuthLDAPGroupAttribute member
AuthLDAPGroupAttributeIsDN on
require ldap-group CN=DEPT_xxx,DC=domain,DC=xxx,DC=org,DC=tw
ErrorDocument 401 "Please use AD username and password to login GIT."
</Location>