17

I'm running into a problem using LDAP to authenticate logins.

I already created a user with all basic info and try to login through phpldapadmin with detail :

Login DN: cn=Sample User,ou=people,dc=example,dc=om
Password: xxxx

then it can login.

But when i try to use with this :

Login DN: uid=sampleuser,ou=people,dc=example,dc=om
Password: xxxx

it never works (cannot login).

Please tell me what should i config?

3
  • Does that second entry exist in LDAP? With that password?
    – user207421
    Commented Aug 12, 2013 at 0:52
  • Yes as i've mentioned above that i've set all basic info (entry) like givenName, sn, mail, etc. Commented Aug 12, 2013 at 7:58
  • 2
    No, you haven't mentioned it above: that's why I'm asking. The fact that you've accepted an answer that states that it doesn't exist proves the point.
    – user207421
    Commented Aug 14, 2013 at 2:25

2 Answers 2

25

If the LDAP client is using a simple BIND operation, then the BIND DN must exist. The simple BIND operation takes as arguments at least the DN and a password.

Consider the following entries:

dn: cn=sample user,ou=people,dc=example,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: sample user
uid: sampleuser

is not the same entry as:

dn: uid=sampleuser,ou=people,dc=example,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: sample user
uid: sampleuser

even though the attributes are identical (the SN which is required by inetOrgPerson is omitted in this example). Th DN is the primary key and must be used with the simple BIND operation. The entries given above, are two complete separate entries with two different DNs.

1
  • tq u for ur explanation, it helps me alot! Commented Aug 12, 2013 at 9:49
7

I know its bit outdated but i was facing same problem. Thing is as Terry described that full dn's are different. You can fix this by forcing phpldapadmin to create users with uid as first key in dn.

You can change

<rdn>cn</rdn>

to

<rdn>uid</rdn>

in file

/etc/phpldapadmin/templates/creation/posixAccount.xml

That will create every posixAccount as:

dn: uid=sampleuser,ou=people,dc=example,dc=com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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