[Samba] Wrong interface on AD Provisioning

Rowland penny rpenny at samba.org
Mon Dec 28 09:57:41 UTC 2015

On 27/12/15 23:14, Viktor Trojanovic wrote:
> On 27.12.2015 20:48, Marc Muehlfeld wrote:
>> Hello Viktor,
>> Am 27.12.2015 um 19:41 schrieb Viktor Trojanovic:
>>> When I provisioned a new AD domain, I used the wrong network interface
>>> in the provisioning command.
>>> samba-tool domain provision --option="interfaces=lo eth2" 
>>> --option="bind
>>> interfaces only=yes" --use-rfc2307 --use-xattrs=yes --interactive
>>> I should have used eth1 instead of eth2. The latter had no IP address
>>> attached to it so that there is no (correct) A record in the internal
>>> DNS for the DC. At any rate host -t A dc.samdom.domain.com is returning
>>> an error (Host not found: 3(NXDOMAIN)).
>>> How can I correct this *without* MS Windows RSAT? Can I just run the
>>> same command again and it will overwrite the previous config?
>> * Remove the smb.conf. Otherwise, you have to fix the 'interfaces'
>> option values manually.
>> * Remove all databases (/usr/local/samba/var/ and
>> /usr/local/samba/private/). Not all files will be overwritten, so it's
>> better to remove all, instead to mixup something.
>> *  re-run the command.
>> Warning: You will loose you entire domain! Everything has to be
>> re-created (users, groups, machines need to be rejoined, etc.).
>> Regards,
>> Marc
> That's what I was looking for. Thanks.

Hi Marc, if, as you say, you need to remove everything before 
reprovisioning, why are there these lines in the provisioning code 

  def provision(logger, session_info, smbconf=None,

     """Provision samba4

     :note: caution, this wipes all existing data!


def setup_samdb_partitions(samdb_path, logger, lp, session_info,

     """Setup the partitions for the SAM database.

     Alternatively, provision() may call this, and then populate the 

     :note: This will wipe the Sam Database!

     :note: This function always removes the local SAM LDB file. The erase
         parameter controls whether to erase the existing data, which
         may not be stored locally but in LDAP.

If I have to reprovision, I just remove smb.conf and I have never had a 


More information about the samba mailing list