Hi folks,
Quick question if I may:
Is it possible to rename a DN, 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
I tried that, and ldapmodify does not seem to like it :(
Many thanks,
Tim
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
On 18/09/11 21:48, Lars Kellogg-Stedman wrote:
I tried that, and ldapmodify does not seem to like it :(
You want the "ldapmodrdn" command.
-- Lars
Thanks to you both Phillip and Lars - it was a little fiddly to get the syntax right, but I got it to work eventually :)
Many thanks,
Tim
openldap-technical@openldap.org