我想用Apache 2.4设置LDAPauthentication。 LDAP Sever是Windows 2008。
我的.htaccess看起来像:
AuthType Basic AuthName "Login" AuthBasicProvider ldap AuthLDAPBindDN "CN=user,OU=Dienstkonten,DC=company,DC=lan" AuthLDAPBindPassword "pwd" AuthLDAPURL "ldap://dc.company.lan/DC=company,DC=lan?sAMAccountName?sub?(objectClass=*)" NONE require ldap-group CN=Login-Group,OU=Dienstkonten,DC=company,DC=lan
但是我总是得到错误 :
(70023)This function has not been implemented on this platform: AH01277: LDAP: Unable to add rebind cross reference entry. Out of memory?
我错了什么? 我如何使用ldap和apache 2.4来validation用户?
这为我解决了这个问题:
LDAPReferrals Off
从这里和这里收集的其他技巧:
AuthzLDAPAuthoritative off # Use the password without quotes, eg password instead of "password" AuthLDAPBindPassword password
不过,这些对我来说是没有必要的。
LDAP:???//dc.company.lan/DC=company,DC=lan sAMAccountName赋子(objectClass的= *)
这个filter似乎search整个目录,包括每个可能的对象类。 当然,你可以把它削减到你为人们使用的任何对象类别?
由于这看起来像来自Win AD的错误,您可以直接联系Microsoft并要求他们提供反馈。
或者你可以通过首先build立一个标准的LDAP服务器(例如OpenLDAP),用与你的AD内容相对应的testdata填充它来准备这个步骤),然后在这个LDAP服务器上testing你的设置。
成功完成后,再与AD一起再试一次。 如果没有,那么你可以设置OpenLDAP来提供AD的必要“视图”以使应用程序成功。