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

Re: How to move a contact from one OU to another

The problem is the changetype you've specified in the LDIF file.  modrdn
( modify RDN ) will only change the relative DN, or the leftmost part of the
DN ( uuid=2 here ).  In order to make a more general change to the DN,
thereby moving the entry to a new part of the tree, you need to use the
changetype moddn which is available in LDAPv3.  I don't believe that
versions of openldap prior to 2.0 support LDAPv3, so your either going to
need to upgrade, or fall back to an old work around.  That is to create the
new entry 'uuid=2,ou=temp,o=GBB,c=US' then delete the old entry.  This
may create problems if a connected user is doing searches for properties
of the entry -- they may get both the old and the new entry if the timing is
right ( or wrong :-) -- but is otherwise functionally equivalent to moddn.


----- Original Message -----
From: "Mike Coughlan" <mcoughlan@gothambroadband.com>
To: <openldap-software@openldap.org>
Sent: Monday, February 19, 2001 1:38 PM
Subject: How to move a contact from one OU to another

> I am trying to move a contact from one OU to another.  I am trying to use
> the ldapmodify command:
> ldapmodify -f /home/mcoughlan/ldapmodtext -D "cn=Admin,o=GBB,c=US" -w
> where ldapmodtext is:
> dn: uuid=2, ou=Sales, o=GBB, c=US
> changetype: modrdn
> newrdn: uuid=2, ou=temp, o=GBB, c=US
> deleteoldrdn: 0
> I am also using the Java LDAP Browser/Editor version 2.8 (beta 2)by Jarek
> Gawor to check my work.
> I ran the command - there were no errors, but teh target "uuid=2,
> o=GBB, c=US" no longer appears in the LDAP Browser.  It also did not
> reappear in ou=temp.  Where did it go? Did I miss something?
> Versions:
> RH 7.0
> openldap-1.2.11-15
> openldap-servers-1.2.11-15
> openldap-clients-1.2.11-15
> _________________________
> Mike Coughlan
> 3 West 18th Street
> NYC 10011
> Tel: + ext 310
> Fax: +
> email: mcoughlan@gothambroadband.com