Red Hat Directory Server 8.0 Administrator's Guide
dn: cn=John Doe
changetype: modrdn
newrdn: uid=jdoe1
deleteoldrdn: 1
18.1.2. Renaming an Entry with a Single-Valued Naming Attribute
To rename an entry that has a single-valued naming attribute, do the following:
1. Rename the entry using a different naming attribute, and keep the old RDN. For example:
ldapmodify -D adminDN -w password
dn: nsuniqueid=66446001-1dd211b2+dc=pubs,dc=example,dc=com
changetype: modrdn
newrdn: cn=TempValue
deleteoldrdn: 0
2. Remove the old RDN value of the naming attribute and the conflict marker attribute. For
example:
ldapmodify -D adminDN -w password
dn: cn=TempValue,dc=example,dc=com
changetype: modify
delete: dc
dc: pubs
-
delete: nsds5ReplConflict
-
NOTE
The unique identifier attribute nsuniqueid cannot be deleted.
3. Rename the entry with the intended attribute-value pair. For example:
ldapmodify -D adminDN -w password
dn: cn=TempValue,dc=example,dc=com
changetype: modrdn
newrdn: dc=NewValue
deleteoldrdn: 1
Setting the value of the deleteoldrdn attribute to 1 deletes the temporary attribute-value pair
cn=TempValue. To keep this attribute, set the value of the deleteoldrdn attribute to 0.
Solving Naming Conflicts
345