Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
becki:linux:samba [2012-09-24 08:09] becki List Users in Smb Database |
becki:linux:samba [2018-01-15 09:55] (aktuell) becki |
||
---|---|---|---|
Zeile 73: | Zeile 73: | ||
===== Import User Accounts from other Smb Server == | ===== Import User Accounts from other Smb Server == | ||
- | FIXME Test this! | + | <del>Just copy ''/etc/samba/private/passdb.tdb'' form old server to new server.</del> This doesn't work any more. They user account/password file is now at ''/var/lib/samba/private'' |
- | Just copy ''/etc/samba/private/passdb.tdb'' form old server to new server. | + | Because the new location of the password file is obviously not mentioned in man pages of pdbedit and smbpasswd i suppose it is not meant to simply copy it over. Instead on the old server we export all samba users to a textfile and import that file into the new samba server: |
- | If this does not work, convert the ''passdb.tdb'' with the old server to the text based ''smbpasswd'' file, copy this file to the new server and convert it to ''passdb.tdb'' again. Use the ''pdbedit'' command for conversion. See [[http://linuxpoison.blogspot.com/2009/11/how-to-convert-smbpasswd-to-tdbsam-on.html|1]] and [[http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/passdb.html#pdbeditthing|2]] | + | <code bash> |
+ | # On old server: | ||
+ | pdbedit -e smbpasswd:smbusers.txt | ||
+ | # Now copy smbusers.txt to new server and on the new server: | ||
+ | pdbedit -i smbpasswd:smbusers.txt | ||
+ | </code> | ||