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

Re: Rename DN ?



On Fri, 16 Sep 2011, Tim Watts wrote:
> Quick question if I may:
> 
> Is it possible to rename a DN,

Yes, it's possible to modify the DN of an entry.


> eg this LDIF file:
> 
> 
> dn: cn=Fred,ou=people,dc=example,dc=com
> changetype: modify
> replace: dn
> dn: cn=Fred,ou=people,ou=external,dc=example,dc=com

...but not with that LDIF.


> I tried that, and ldapmodify does not seem to like it :(

Right, because 'dn' isn't an attribute.  LDIF has a different syntax for 
doing modrdn operations.  This was discussed on this very list just over a 
week ago, on the 12th or so.  Check the archives for the thread with 
Subject "Change a user dn".

Or read the LDIF and LDAP protocol RFCs (rfc2849 and rfc4511), or the 
ldapmodrdn manpage.


Philip