November 19th, 2004, 08:42 AM
Join Date: Sep 2004
Time spent in forums: < 1 sec
Reputation Power: 0
Active Directory (Microsoft LDAP SDK) : Problem with ldap_bind_s
I am binding a user with correct password to active directory(SSL enabled). The user's
attribute “User Must Change password at next logon” is set (i.e. pwdLastSet=0).
lderr = ldap_bind_s(ld, (char *) (LPCTSTR) szPath,(char *) (LPCTSTR) szPassword, LDAP_AUTH_NEGOTIATE);
ldap_get_lderrno(pld->m_pLdap, NULL, &szErrmsg);
1. lderr = 49
2. szErrmsg = "8009030C: LdapErr: DSID-0C0903E2, comment:
AcceptSecurityContext error, data 0, v893"
The error message I got is same when I try to bind a user with wrong password and whose attribute pwdLastSet= -1.
How will I distinguish that user login is rejected due to bad password or pwdLastSet=0 ?
I am sure there is no problem with SSL or other AD configuration.