[Date Prev][Date Next] [Chronological] [Thread] [Top]

naming attribute being change on ldapadd



I've got an odd issue with ldapadd. I think it is a lack of understanding on
my part.

Test environment is OpenLDAP on a Fedora Core 4 machine.

I've created an element ou=Portals.

I make the file "test.ldif" with the following contents:
version: 1
dn: commonName=test,ou=Portals,dc=cityxpress,dc=com
commonName: test
description: Some room
objectClass: room

I add the entry with:
> ldapadd -D "cn=Manager,dc=cityxpress,dc=com" -w secret -f test.ldif 
adding new entry "commonName=test,ou=Portals,dc=cityxpress,dc=com"

I then search for the entry with:
> ldapsearch -b "ou=Portals,dc=cityxpress,dc=com"

# test, Portals, cityxpress.com
dn: commonName=test,ou=Portals,dc=cityxpress,dc=com
cn: test
description: Some room
objectClass: room

I don't understand why OpenLDAP changes the attribute "commonName"
to "cn". I think I understand that they are both names for the same
attribute type. But why does the attribute get changed.

Note that this doesn't seem to cause a lot of problems except for a 3rd
party LDAP client that gets confused by the switch.

Thanks in advance for any insite that people can give me on this.