Kriss
Kriss

Reputation: 73

Authentication failed: 0x31 (Invalid credentials; 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1)

I have problem with change LDAP class from: http://adldap.sourceforge.net/ to ZEND LDAP Class.

    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');

It works! But my confing in ZEND doesn't. :(

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

Thanks!

Upvotes: 0

Views: 7806

Answers (1)

jwilleke
jwilleke

Reputation: 10976

NOTE: 52e is Returned when username is valid but password/credential is invalid. Will prevent most other errors from being displayed as noted.

-jim

Upvotes: 3

Related Questions