我从更改LDAP类时遇到问题: http://adldap.sourceforge.net/ ZEND LDAP类。
require_once("/adLDAP/adLDAP.php");
define('LDAP_SRV','my-ip');
define('LDAP_DN','DC=local,DC=co');
define('LDAP_SUFFIX','@local.co');
define('LDAP_ADMIN','admin');
define('LDAP_PASS','adminpass');
$ldap = new adLDAP(array('base_dn'=>LDAP_DN, 'account_suffix'=>LDAP_SUFFIX,'domain_controllers'=>array(LDAP_SRV)));
$ldap->close();
$ldap->setAdminUsername(LDAP_ADMIN);
$ldap->setAdminPassword(LDAP_PASS);
$ldap->connect();
$auth = $ldap->user()->authenticate('user','userpass');
有效!但我在ZEND的困惑并不是。 :(
ldap.log_path = "/home/vacation/www/tmp/ldap.log"
ldap.server2.host = "my-ip"
ldap.server2.useStartTls = false
ldap.server2.accountDomainName = "local.co"
ldap.server2.accountDomainNameShort = "local"
ldap.server2.accountCanonicalForm = 3
ldap.server2.baseDn = "CN=Users Accounts,DC=local,DC=co"
ldap.server2.username = "CN=admin,DC=local,DC=co"
ldap.server2.password = "adminpass"
LOG:
2014-06-03T21:32:57+02:00 DEBUG (7): Ldap: 1: host=my-ip,useStartTls=,accountDomainName=local.co,accountDomainNameShort=local,accountCanonicalForm=3,baseDn=CN=Users Accounts,DC=local,DC=co,username=CN=admin,DC=local,DC=co,password=*****
2014-06-03T21:32:57+02:00 DEBUG (7): Ldap: 2: user authentication failed: 0x31 (Invalid credentials; 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1): CN=admin,DC=local,DC=co
谢谢!
答案 0 :(得分:3)
注意:当用户名有效但密码/凭证无效时,将返回52e。将防止显示大多数其他错误。
-Jim