[Samba] Migrate users from old server to new server without moving/copying configuration

Piers Kittel piers at centrefordeaf.org.uk
Thu Nov 8 22:08:52 UTC 2018


Hello all,

We're running a Samba AD DC and we want to move to a new server. The old 
server is slightly misconfigured and have some issues, and the new 
server has already been set up freshly set up with no issues and 
everything working fine.  I need to move users, groups & passwords from 
the old server to the new one without moving configuration and retaining 
the old issues, am hoping someone can help me.  The new server is 
running Debian 9 with Samba version 4.5.12-Debian - not sure what other 
information I should be putting here.

Following someone's suggestion, I've copied over /etc/passwd, 
/etc/shadow, /etc/groups, /var/lib/samba/private/passdb.tdb, sam.ldb, 
secrets.tdb but unsurprisingly this didn't work.

I've tried downloading the database from the old server using pdbedit 
but I had a host of errors, for example:

build_sam_pass: Failing attempt to store user with non-uid based user RID.
Importing account for krbtgt...failed

I'm hoping someone could tell me the best way to migrate users to the 
new server?

Many thanks for your time!

With kind regards - Piers








More information about the samba mailing list