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

Rowland Penny rpenny at samba.org
Fri Nov 9 09:39:11 UTC 2018

On Thu, 8 Nov 2018 22:08:52 +0000
Piers Kittel via samba <samba at lists.samba.org> wrote:

> 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.

You need to fix your misconfiguration and then join a new DC, it is the
only way to transfer the data.

What is actually wrong with your DC ?

> 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.

No, it wouldn't

> 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

Anything other than joining another DC isn't going to work.


More information about the samba mailing list