You can use an LDIF change record to rename an entry, move it, or do both in one operation. Modifying the DN uses two keywords and moving an entry requires a third keyword. These keywords have the following meaning:
Renaming an Entry. The following example shows how to rename an entry and retain the old value.
version: 1 dn: cn=Kim Jones, ou=English, ou=Humanities, o=UofZ changetype: moddn newrdn: cn= Kim Jones-Smith deleteoldrdn: 0
Moving an Entry. The following example shows how to move an entry from the English department to Spanish department.
version: 1 dn: cn=Kim Jones, ou=English, ou=Humanities, o=UofZ changetype: moddn newrdn: cn=Kim Jones deleteoldrdn: 1 newsuperior: ou=Spanish, ou=Humanities, o=UofZ
Renaming and Moving an Entry. The following example shows how to rename and move an entry in the same operation.
version: 1 dn: cn=Kim Jones, ou=English, ou=Humanities, o=UofZ changetype: moddn newrdn: cn=Kim Jones-Smith deleteoldrdn: 0 newsuperior: ou=Spanish, ou=Humanities, o=UofZ