Le 29/07/2012 04:34, Qian Zhang a écrit :
Do you use something like cn=My Name,ou=Users,dc=example,dc=com with
uid in the entry or uid=ghenry,ou=Users,dc=example,dc=com ?
[Qian] Sorry, I am new to LDAP, can you please let me know how to figure out which way I am using for DN format? By some ldap commands?
BTW, I installed and setup LDAP in a default way, so I guess the DN format should be "uid=ghenry,ou=Users,dc=example,dc=com" because when I login my machine with uid, it works, but if I login with common name, it fails.
I don't know what could be a default way to setup an LDAP server. And you're basically confusing how is the information stored in the directory (the DIT), and the way your LDAP client (pam_nss or sssd, probably) is interpreting them. Remember than an LDAP is a generic database system, not a dedicated posix account storage system (contrarily to NIS, for instance), meaning they are different ways to achieve the same result. And the fact than your client works as expected doesn't give any hint about your directory content, excepted that it is properly configured.
Just try 'ldapsearch -x -b <yourbase>' to get an idea of your LDAP directory content.