LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   OpenLDAP - change DN (https://www.linuxquestions.org/questions/linux-server-73/openldap-change-dn-805180/)

shlonginator 04-30-2010 09:44 AM

OpenLDAP - change DN
 
Hi all,
I currently have an OpenLDAP server where everytime I add a new user their DN looks like this:
DN: cn=username,ou=people,dc=domainname,dc=com

is their anyway I can change there dn to be in the following format?
username@domainname.com

thanks in advance

acid_kewpie 04-30-2010 10:02 AM

no, because that wouldn't be a legal x.500 format DN. You might wish to describe the actual scenarios and problems you're facing, rather than the way you think you want to fix the problem you have. a dn is NOT a username, it's just a unique obkect identifier within the LDAP database. You can use any attribute you wish as the username, e.g. email address, assuming that your front end supports it.

shlonginator 04-30-2010 11:26 AM

Hi Chris,

I am using a client that only binds to the LDAP server in the username@domainname format.
This format works fine with Active Directory, and is supposed to work with OpenLDAP too...
I have added the users with a simple username e.g. user1@testdomain.com, however the DN always ends up with the above mentioned format.
I see binding errors (in wireshark) when trying to login - error is "bad dn, invalid synthax)

Thanks!!
Shane

acid_kewpie 04-30-2010 01:03 PM

It does work, again you need to define what attribute you are comparing the data against. You are very much wrong to think that AD is doing something different. an AD LDAP DN is exactly the same as an OpenLDAP DN. If it wasn't it wouldn't be legal LDAP.

You are seeing bind errors because, as I already said, that's not a valid DN, so will never be accepted as a DN by any LDAP service in the world. You need to look over your client, and see how it is configured to use which attributes of the object.

Blue_Ice 04-30-2010 01:45 PM

user1@testdomain.com is the same as testdomain.com\user1 for AD. So @ or \ are just separators. So it says that the user is user1 and the domain to log on is testdomain.com. Therefore the complete username is not user1@testdomain.com. The dn could look like something as cn=user1,...,dc=testdomain,dc=com, where the dots can be a number of organizational units.


All times are GMT -5. The time now is 03:48 AM.