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

Re: (ITS#4561) ldapmodrdn argument limitation

On Mon, 2006-05-22 at 15:59 +0000, richard.francis@cardinal.com wrote:

> $ /usr/bin/ldapmodrdn -r -x -v -h 10.x.x.x -p 3389 -D cn=Directory Manager -w
> password -f /home/idmldap/entrymods
> ldapmodrdn: invalid number of arguments (7): limit two
> How do I get around the command limiting me to only two arguments. Consider that
> I need to use simple authentication, requiring 4 options.

> "entrymods" 2 lines, 95 characters
> $ pwd
> /home/idmldap
> $ ^[
> $
> $ cat entrymods
> uid=qfirst986.qlast986,ou=North America,ou=Internal,ou=users,o=cardinal
> uid=qlast986.qfirst986

> $ ldapmodrdn /?
> ldapmodrdn: invalid number of arguments (1), only two allowed
> Rename LDAP entries
> usage: ldapmodrdn [options] [dn rdn]
>         dn rdn: If given, rdn will replace the RDN of the entry specified by DN
>                 If not given, the list of modifications is read from stdin or
>                 from the file specified by "-f file" (see man page).

First of all, you modify using /usr/bin/ldapmodrdn, but then you read
the help of just ldapmodrdn; are you sure they're the same binary?

Then, there might be a misunderstanding: that error message indicates
that unqualified args (i.e. args other that optional switches, like -r -
x and so) must be exactly 2: the oldDN and the newRDN.  This is true
unless a file is provided with -f.

Apparently, ldapmodrdn doesn't like your file.  Unless you find out the
reason (mine is working just fine; I suspect your shell doesn't
understand that <cn=Directory Manager> is the entire DN, and treats the
space as an arg separator?), you can use regular LDIF with ldapmodify to
perform rename as well.  See ldif(5) for details.

Unless you clearly pinpoint a bug in OpenLDAP software, this ITS will be


Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it