Samba 2.x to 3.x on different server

Today I spent half day on trying to migrate samba 2.x from one machine to samba 3.x on another machine. Samba was also acting as an NT4 PDC with some machine members and use accounts. A bit of googling around gave me a lot of tips on completing the task as well as some possible troubles.

Some tries and I figured out the way:

1. Migrate the server:

– stop the old server

– copy /etc/* and /var/cache/samba/* to the new machine

– add user accounts and groups to /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow

testparm on new machine to remove all obsolete config directives

– adjust the config (change the paths and other stuff)

– copy the files from old server to new one

– start samba on new server

2. Migrate clients:

– remove client from the domain to workgroup using the administrative account from the old domain (it is cached so will work even with old samba server offline)

– join new domain with new administrative account

No user migration is needed since all the samba files are transfered on the new server and user SIDs as well as server SID remains the same. The only thing I needed to do is to disconnected all mapped drives so that they connect back from new server at next login, otherwise clients will use cached information about mapped drives and will try to connect them from the old server.