Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ldapsearch: Invalid credentials

I am trying to authenticate against our institutional LDAP server with the command ldapsearch. My user info in LDAP is shown in the following image1]

I used this command below to search by my DN:

ldapsearch -x -H ldap://ldap.mdanderson.edu:389 -D "CN=Djiao,OU=Institution,OU=People" -b DC=mdanderson,DC=edu -w xxxyyyzzz

However I got the error:

ldap_bind: Invalid credentials (49)
    additional info: 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1

What is wrong with my ldapsearch command?

like image 205
Nasreddin Avatar asked Dec 01 '22 13:12

Nasreddin


2 Answers

I got similar error but it was fixed after using -D user@domain like:

-D [email protected]

like image 52
Hamid Avatar answered Dec 09 '22 19:12

Hamid


The bind DN is not complete in your command. It should end with DC=mdanderson,DC=edu. So, it is likely that it should be: CN=Djiao,OU=Institution,OU=People,DC=mdanderson,DC=edu

In Active Directory, though, users are typically under the CN=users tree (I don't see your tree hiearchy). So, the bind DN (the DN after the -D argument) may have to be: CN=Djiao,OU=Institution,CN=Users,DC=mdanderson,DC=edu

like image 40
Bertold Kolics Avatar answered Dec 09 '22 20:12

Bertold Kolics