Web lists-archives.com

[Samba] How to migrate samba users?

Hello Samba users mailing list :)

I want to migrate samba users from an old server to a new one. The old server has Samba 4.2 on Debian 8 Jessie. The new server has Samba 4.5 on Debian 9 Stretch. Both are plain SMB/CIFS servers, no DC or AD.

Both have this in smb.conf (generated by testparm from an smb.conf.source file which has nothing about the backend):

    idmap config * : backend = tdb

I tried export and import but the old server users did not appear on the new server (user names changed to protect the innocent):

root@old:~# pdbedit --export tdbsam:/tmp/old.tdbsam.export.tdb
[copied old.tdbsam.export.tdb from old to new]
root@new:~# pdbedit --import tdbsam:/tmp/old.tdbsam.export.tdb
Importing account for new-user-1...ok
Importing account for new-user-2...ok
root@new~# pdbedit --list

I tried running pdbedit with --debuglevel=5 but was not enlightened.

What to do? It would be nice to merge users from old to new as tried. If merge is not possible, it would be OK to loose the new users and re-create them.

Is it OK to replace the whole new /var/lib/samba tree with the old one?



To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba