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

ldapmodrdn w/ 2.3.7



I am noticing something interesting with ldapmodrdn on 2.3.7. In the manpage, it states one or more blank lines may be used to separate each DN/RDN pair. However, if I create a file with multiple entries in it, seperated by a blank line, it appears ldapmodrdn is not ignoring the blank line or using it as a seperator. Instead it appears to take its value as null.

For example, if my file contains the following, the first entry will succeed, but the second will fail w/ Invalid DN syntax.

uid=modrdntest1,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest1@mydomain.net

uid=modrdntest2,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest2@mydomain.net

uid=modrdntest3,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest3@mydomain.net

uid=modrdntest4,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest4@mydomain.net

uid=modrdntest5,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest5@mydomain.net


Running ldapmodrdn -r -n -v -f testbad, shows
Renaming "uid=modrdntest1,ou=users,ou=radius,dc=mydomain,dc=net"
new rdn="uid=modrdntest1@mydomain.net" (delete old rdn)
Renaming ""
new rdn="uid=modrdntest2,ou=users,ou=radius,dc=mydomain,dc=net" (delete old rdn)
Renaming "uid=modrdntest2@mydomain.net"
new rdn="" (delete old rdn)
Renaming "uid=modrdntest3,ou=users,ou=radius,dc=mydomain,dc=net"
new rdn="uid=modrdntest3@mydomain.net" (delete old rdn)
Renaming ""
new rdn="uid=modrdntest4,ou=users,ou=radius,dc=mydomain,dc=net" (delete old rdn)
Renaming "uid=modrdntest4@mydomain.net"
new rdn="" (delete old rdn)
Renaming "uid=modrdntest5,ou=users,ou=radius,dc=mydomain,dc=net"
new rdn="uid=modrdntest5@mydomain.net" (delete old rdn)



If I modify the file and remove all blank lines, so it looks like this.

uid=modrdntest1,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest1@mydomain.net
uid=modrdntest2,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest2@mydomain.net
uid=modrdntest3,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest3@mydomain.net
uid=modrdntest4,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest4@mydomain.net
uid=modrdntest5,ou=users,ou=radius,dc=mydomain,dc=net
uid=modrdntest5@mydomain.net

They will all succeed.

Renaming "uid=modrdntest1,ou=users,ou=radius,dc=mydomain,dc=net"
        new rdn="uid=modrdntest1@mydomain.net" (delete old rdn)
Renaming "uid=modrdntest2,ou=users,ou=radius,dc=mydomain,dc=net"
        new rdn="uid=modrdntest2@mydomain.net" (delete old rdn)
Renaming "uid=modrdntest3,ou=users,ou=radius,dc=mydomain,dc=net"
        new rdn="uid=modrdntest3@mydomain.net" (delete old rdn)
Renaming "uid=modrdntest4,ou=users,ou=radius,dc=mydomain,dc=net"
        new rdn="uid=modrdntest4@mydomain.net" (delete old rdn)
Renaming "uid=modrdntest5,ou=users,ou=radius,dc=mydomain,dc=net"
        new rdn="uid=modrdntest5@mydomain.net" (delete old rdn)

Is ldapmodrdn supposed to use a blank line to seperate the dn/rdn pairs?


Thanks Dusty Doris