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

Re: Problems with ldapmodrdn command.



You are passing two DNs as arguments, rather than a DN and an RDN.

>From the ldapmodrdn man page:

DESCRIPTION
       ldapmodrdn   is     a   shell-accessible  interface  to  the
       ldap_modrdn2(3) library call.
       
       ldapmodrdn opens a connection to an  LDAP  server,  binds,
       and modifies the RDN of entries.  The entry information is
       read from standard input, from file through the use of the
       -f option, or from the command-line pair dn and rdn

[...]

EXAMPLE
       Assuming that the file /tmp/entrymods exists and  has  the
       contents:

       cn=Modify Me, dc=example, dc=com
       cn=The New Me

[...]


> From: Carles Xavier Munyoz Baldó <carles.munyoz@ctv-jet.com>
> Organization: Wanadoo España, S.L.
> Reply-To: carles.munyoz@ctv-jet.com
> Date: Fri, 9 Feb 2001 13:54:33 +0100
> To: <openldap-software@OpenLDAP.org>
> Subject: Problems with ldapmodrdn command.
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> Hi,
> I have installed OpenLDAP 2.0.7 over Sun Solaris 2.6.
> I'm having problems with the ldapmodrdn command.
> When I execute it to modify the RDN of an entry it eliminates the old RDN,
> but doesn't creates the new RDN.
> 
> This is the test I have done:
> # ldapadd -f data1.ldif -x -D "cn=Manager,dc=example,dc=com" -w secret
> # adding new entry "cn=test1,dc=example,dc=com"
> 
> where the LDIF file data1.ldif is:
> dn: cn=test1,dc=example,dc=com
> objectClass: organizationalRole
> cn: test1
> description: Test user 1
> 
> Next I execute this command to modify the RDN for the user test1:
> # ldapmodrdn -D "cn=Manager,dc=example,dc=com" -w secret
> "cn=test1,dc=example,dc=com" "cn=test2,dc=example,dc=com"
> 
> If I search for the old RND and for the new RDN I obtain:
> # ldapsearch -LLL -x -b cn=test1,dc=example,dc=com
> # No such object (32)
> # Matched DN: dc=example,dc=com
> 
> # ldapsearch -LLL -x -b cn=test2,dc=example,dc=com
> # No such object (32)
> # Matched DN: dc=example,dc=com
> 
> 
> May someon help me with this ?
> Is there any option in the slapd.conf file related with the RDN modification ?
> 
> Greetings.
> ---
> Carles Xavier Munyoz Baldó / cmunyoz@es.wanadoo.com
> ---
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 5.0i for non-commercial use
> MessageID: tRm33mDo7ApEOYioxb7+sUukIbwLMcmG
> 
> iQA/AwUAOoPoihAGkoZz8//aEQKgkACgkhGBPGUK5q+xCXj5o/9LVpV6sToAniXk
> uiW+dQnbLx25bXDhOXmMOp3T
> =vonX
> -----END PGP SIGNATURE-----
>