Log into ldap with uid instead of cn in DN input

I am having a problem using LDAP to authenticate logins.

I already created a user with all the basic information and try to log in via phpldapadmin with the details:

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

then he can log in.

But when I try to use with this:

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

it never works (cannot log in).

Please tell me what I need to configure?

+8
ldap
source share
2 answers

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

Consider the following entries:

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

- this is not the same entry as:

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

although the attributes are identical (the SN that inetOrgPerson requires is not specified in this example). Th DN is the primary key and should be used with a simple BIND operation. The entries above are two complete separate entries with two different DNs.

+19
source share

I know that it is outdated, but I had the same problem. The fact is that Terry described that the full dn are different. You can fix this by forcing phpldapadmin to create users with uid as the first key in dn.

You can change

 <rdn>cn</rdn> 

to

 <rdn>uid</rdn> 

in file

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

This will create each posixAccount as:

 dn: uid=sampleuser,ou=people,dc=example,dc=com 
0
source share

All Articles