[Samba] metod for change domain name

Rowland penny rpenny at samba.org
Wed Apr 21 14:29:43 UTC 2021

On 21/04/2021 15:00, Marcos Ariel Negrini via samba wrote:
> Hi Rowland:
> exactly, that's why I indicated to unzip it in the var folder(

No, the script does it all for you.

You first have to create a backup with your new netbios and dns domain 
names, you do this with a command like this:

samba-tool domain backup rename NEWDOMAIN new.renamed.com 
--server=old_dc --targetdir=/root -UAdministrator

Copy the resultant tarball in /root to the new DC

Now lets say the backup tarball is in /root on the new dc and you want 
the target dir to be /tmp/samba

You would use a command like this:

samba-tool domain backup restore --backup-file=/root/backup.tar.bz2 
--targetdir=/tmp/samba --newservername=newdc -UAdministrator

This should create a new DC in the new domain, without you doing 
anything else.


More information about the samba mailing list