On 22/06/15 14:40, Jochen Eggemann wrote:> Hi folks,
>
> I'm currently playing with a samba 4.1.17 test domain. The classic
> update left me with the usernames as cn. I would like to change the cn
> to the full name of the users.
>
> Doing it by hand is no problem:
>
> ldbrename -H /path/to/sam.ldb
> "cn=username,ou=users,dc=xxx,dc=yyy,dc=de" "cn=Full
> Name,ou=users,dc=xxx.dc=yyy,dc=de"
>
> Works like a charm.
>
> So I generated a shell script containig the other 200 users in the
> domain. One line per user. Same as above. Running it all I get is:
>
> rename of '"cn=username,ou=users,dc=xxx,dc=yyy,dc=de"' to
'"cn=Full'
> failed - ldb_rename: invalid olddn '(null)'
>
> Seems that ldbrename is not getting the olddn. But why? I'm using the
> same syntax. Any ideas?
>
> Jochen
>
>
I think you are hitting the 'Unix doesn't like spaces' problem, try
changing 'Full Name' to 'Full\ Name' i.e. escape the space.
Rowland