[Samba] winbind: how to fix uid/SID mapping following migration to a new DC

Jean-Yves Avenard jyavenard at gmail.com
Wed Dec 7 04:06:19 MST 2011


Hi there.

Our IT moved all the user accounts to a new domain controller.
It wasn't much of a migration, more so a complete setup on a new
machine, new OS, new domain ; it just happens that the username and
group names remained the same.

I have been asked to look after the migration of the existing unix
servers (linux and freebsd running samba 3.4).
All the unix machine use winbind for authentication purposes

Previously the mapping between uid and sids were mapped as follow:
        idmap backend = idmap_rid:MEL=10000-100000000
        idmap uid = 10000-100000000
        idmap gid = 10000-100000000

That was simple and easy.

Problem is, on the new domain controller, while the username are the
same, the SIDs are not.

So should I move the unix machines to the new domain, all ownerships
and permissions will be screwed up.

The new winbind setup is supposed to use the following config for idmap backend:
  idmap backend = ad
  ldap idmap suffix = dc=alloratech,dc=local
  ldap admin dn = cn=access,ou=Alloratech,dc=alloratech,dc=local
  ldap suffix = dc=alloratech,dc=local

Which actually gives similar uid/gid in relation to the SID as the
previous setup (10000 + last digits of SID)

Now, going through all the files and folders found on those servers
(they are used as file server) to fix the ownership and permission is
going to take forever.

Is there a way to make so the uid/SID are matched in such a way that a
username keeps the same uid as before.
For example, editing on the domain controller the ldap entries that
contain the uid/SID map or something like that (just thinking out loud
here)

Any help and/or advices will be greatly appreciated

Thank you in advance
Jean-Yves


More information about the samba mailing list