[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_bind: Invalid credentials (49)

J. Bakshi wrote:
Hello list,

Here is a very typical problem. I have already done some googling but I
am more confused now.  I like to query a user information with his own
id and password.

When I do this as cn=Manager the there is no problem

ldapsearch -h -b "ou=people,dc=example,dc=com" -x
"(&(objectclass=inetOrgPerson)(cn=test2))" uid  -D
"cn=Manager,dc=example,dc=com" -W
Enter LDAP Password:

# extended LDIF
# LDAPv3
# base <ou=people,dc=example,dc=com> with scope subtree
# filter: (&(objectclass=inetOrgPerson)(cn=test2))
# requesting: uid

# test2, people, example.com
dn: cn=test2,ou=people,dc=example,dc=com
uid: rbilly

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Now if I search with the user credential the problem starts

ldapsearch -h -b "ou=people,dc=example,dc=com" -x
"(&(objectclass=inetOrgPerson)(cn=test2))" uid -D "uid=rbilly,ou=people,dc=example,dc=com" -W
Enter LDAP Password:

ldap_bind: Invalid credentials (49)


I have typed the correct password and repeated the above command a no.
of times. But the same error.

why  Invalid credentials ?

Why is the base DN ("uid=rbilly,ou=people,dc=example,dc=com") in your second requestdifferent from the first request ( "cn=test2,ou=people,dc=example,dc=com") ?

cordialement, regards,
Emmanuel Lécharny