[Samba] Samba migration to a new server

Helmut Hullen Hullen at t-online.de
Thu Jan 13 00:30:00 MST 2011


Hallo, Henri,

Du meintest am 13.01.11:

>>> What is the best way to proceed to make this migration as seamless
>>  as
>>> possible for all users (more than 200 user accounts with more than
>>> 200 PC in the domain) ?

>>  My usual way:
>>
>>  - copy/overwrite "/etc/samba" to the new machine
>>  - copy/overwrite all user account and all machine account
>>  informations (especially in "/etc/passwd" and "/etc/shadow") to the
>>  new machine
>>
>>  - Stop samba on both machines
>>  - Shut off all Clients (that may be a bit neurotic ...)
>>  - start samba on the new machine
>>
>>  - Start one client for testing
>>
>>  - if ok: start the other clients

> I have done a similar test some weeks ago without success. The client
> I tested have lost the Domain membership but I am not sure it was
> shutdown at the moment I switched from old to new server.
> In your case, has your new server a different DNS Name , IP address
> and netbios name from the old one ?

The new server replaces the old. It runs with the copied "/etc/samba"  
directory, especially with the same "/etc/samba/smb.conf". And with the  
sam IP address and DNS name.

> Actually, if there are only a few clients that have to be manually
> rejoinded to the domain, it could be acceptable.

In other cases (don't remember what the special difference was) it was  
necessary to

- boot the client local as administrator
- leave the domain
- restart (local, as administrator)
- join the domain

In the above mentioned case that wasn't necessary (and that system has  
about 200 clients ...)

> The *ABSOLUTE*
> condition is that every users keep their windows profile (so their
> Domain SID I guess) once the switch has occurred.

You have to copy
- /home/<user>
- /etc/passwd
- /etc/shadow
- /etc/samba/private (with its *.tdb)

And if the user's profile is no part of his home directory it has to be  
copied too.

-------------------------------------------

In the above mentioned case we first had to change from

        passdb backend = smbpasswd:/etc/samba/private/smbpasswd
to
        passdb backend = tdbsam:/etc/samba/private/passdb.tdb

Long time ago "smbpasswd" was the default, but now "passdb.tdb" is the  
default.

Viele Gruesse!
Helmut


More information about the samba mailing list