0

I am working on a ec2 instance running amazon linux (similar to centos). I have a ldap server set up using open ldap. It appears to be working, but I can only authenticate the admin user, not other users i attempt to add.

If i attempt to test the authentication for the admin users with:

ldapwhoami -x -D "cn=Manager,dc=mydomain,dc=com" -w mypassword

it works just fine. This is a good start!

But I also need to be able to test user authentication. For example I've added a test user tsmith. I attempt to query this user with:

ldapwhoami -x -D "uid=tsmith,ou=users,dc=mydomain,dc=com" -w testuserspassword

I get the response:

ldap_bind: Invalid credentials (49)

I've made sure that the ldap server contains the users and groups that I expect it to. Using "ldapsearch -x -b dc=mydomain,dc=com" i can see the correct users, in the correct groups. The user I'm interested in appears as:

# Test Smith, users, air.local
dn: cn=Test Smith,ou=users,dc=air,dc=local
cn: Test Smith
sn: Smith
objectClass: inetOrgPerson
userPassword:: [password hash here] 
uid: tsmith

Does anyone have any tips about what I might be doing wrong?

1

uid=tsmith,ou=users,dc=mydomain,dc=com is NOT the DN, that is cn=Test Smith,ou=users,dc=air,dc=local and you need to use a DN to make a bind with a -D

| improve this answer | |
  • Thank you! that fixed my problem – clairekelley Feb 25 '19 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.