[Samba] Rename Samba 4 Users
rpenny at samba.org
Wed Mar 22 09:59:44 UTC 2017
On Tue, 21 Mar 2017 21:12:03 -0300
Edson Tadeu Almeida da Silveira <edson.tadeu at gmail.com> wrote:
> When i use ldbrename and ldbmodify without set "cn: " in my ldif, the
> "cn" field don't change.
That might be your problem, you do not use an ldif with ldbrename, the
ldbrename -H /usr/local/samba/private/sam.ldb \
i.e. ldbrename -H /path/to/sam.ldb users_old_dn users_new_dn
You need to run this on the DC.
This will change the 'cn' as well, it has to, because 'cn' has to be the
same as the first part of the user DN, in this case 'CN=ldap05' or to be
even more blunt, look at the first two letters of 'CN=ldap05'
> This is because i set it in file.ldif.
You do not need 'cn' in the secondary ldif, you just need something like
userPrincipalName: User20 at samdom.example.com
i.e. the users new DN and any attributes that require changing.
> But the problem is after this change, i go to ADUC and try to search
> this renamed user and it didn't give any return to me.
It should, have you tried refreshing the view ?
> Beside that,
> its look like the users lose their group relation when renaming using
They shouldn't, the link should be updated.
More information about the samba