我正在嘗試將ldap身份驗證集成到我的一個Zend項目中。Zend:ApacheDS和Windows ldap身份驗證問題
我嘗試使用ApacheDS和Windows ldap for windows 7.我可以連接到兩個ldap服務器,但身份驗證沒有成功。
我的開發環境是:
- 的Windows 7
- IIS服務器
- PHP & MSSQL
- ApacheDS中或Windows LDAP
當我使用ApachDS我收到以下錯誤:
object(Zend_Auth_Result)#122 (3) {
["_identity":protected] => string(9) "mshakeel1"
["_messages":protected] => array(4) {
[0] => string(28) "Account not found: mshakeel1"
[1] => string(71) "0x20: No object found for: (&(objectClass=posixAccount)(uid=mshakeel1))"
[2] => string(188) "host=localhost,accountDomainName=foo.net,accountDomainNameShort=FOO,accountCanonicalForm=3,username=uid=admin,ou=system,password=*****,baseDn=ou=users,ou=system,bindRequiresDn=1,port=10389"
[3] => string(104) "mshakeel1 authentication failed: 0x20: No object found for: (&(objectClass=posixAccount)(uid=mshakeel1))"
}
}
我的application.ini是ApacheDS中如下:
ldap.server.host = localhost
ldap.server.accountDomainName = foo.net
ldap.server.accountDomainNameShort = FOO
ldap.server.accountCanonicalForm = 3
ldap.server.username = "uid=admin,ou=system"
ldap.server.password = 'secret'
ldap.server.baseDn = "ou=users,ou=system"
ldap.server.bindRequiresDn = true
ldap.server.port = 10389
當我使用的是Windows LDAP我收到以下錯誤:
object(Zend_Auth_Result)#122 (3) {
["_code":protected] => int(-3)
["_identity":protected] => string(9) "mshakeel1"
["_messages":protected] => array(4) {
[0] => string(19) "Invalid credentials"
[1] => string(129) "0x31 (Invalid credentials; 8009030C: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 2030, v1db0): W\mshakeel1"
[2] => string(139) "host=ABC-PC-SH,useStartTls=,accountDomainName=w.net,accountDomainNameShort=W,accountCanonicalForm=3,baseDn=CN=Employees,DC=ABC,DC=SHGroup"
[3] => string(162) "mshakeel1 authentication failed: 0x31 (Invalid credentials; 8009030C: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 2030, v1db0): W\mshakeel1"
}
我的application.ini是爲Windows如下LDAP:
ldap.server.host = ABC-PC-SH
ldap.server.useStartTls = false
ldap.server.accountDomainName = w.net
ldap.server.accountDomainNameShort = W
ldap.server.accountCanonicalForm = 3
ldap.server.baseDn = "CN=Employees,DC=ABC,DC=SHGroup"
任何人都可以給我一個提示,以解決這個問題嗎?謝謝。
編輯: 想想添加一些信息.. 我的ApacheDS結構如下圖所示。
而我的窗戶重量輕AD服務是如下所示。
非常感謝您的回答,我想替代品您所提供 另外請你請你告訴我,我怎麼可以設置以下參數: ldap.server.accountDomainName&ldap.server.accountDomainNameShort 謝謝 – Shakeel