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

Re: New superior without new RDN

Dave Horsfall wrote:
OpenLDAP 2.3.32

How do I move an entry to a new superior without changing the RDN as well? I cannot find any examples of this (at least, none that works).

test006, test007, test017, test018, test019, test032, test040, test043, test045, test046, test048...

Wherever you were looking, you should always start by looking in the source distro itself.

    dn: uid=dhtest,dc=coreng,dc=com,dc=au
    changeType: modDN
    newRDN: dhtest
    deleteOldRDN: 1
    newSuperior: ou=systems,dc=coreng,dc=com,dc=au

Fails with:

ldapmodify: invalid format (line 6) entry: "uid=dhtest,dc=coreng,dc=com,dc=au"
Failed to update entry.

"-" is invalid in a modDN request. And yes, newRDN must be an actual RDN, not just a naked value.

I already discovered that I need "newRDN" i.e. just "newSuperior" won't
cut it.

Or must I use "ldapmodrdn", and risk a race condition if making several
changes to the same entry?

ldapmodify doesn't do anything different from ldapmodrdn here.

  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  Chief Architect, OpenLDAP     http://www.openldap.org/project/