[Samba] DNS update when removing interface

Waishon waishon009 at gmail.com
Sat Dec 2 23:32:01 UTC 2017


Hey there,

I'm currenly running Samba 4.7.3 in a Debian Stretch enviroment with the
default built in Samba DNS server.
This works fine, except one problem:

I've added the following in my smb.conf in the global section
bind interfaces only = yes
interfaces = wlp2s0

When I do an nslookup the DNS server it only returns the IP which is
assigned to the wlp2s0 interface. This is right.

Then I add the interface eth0 aswell. After restarting samba nslookup shows
both interfaces as a result. That's also fine.

But when I now remove the eth0 from the config and restart samba, nslookup
still returns this interface altough it is removed? Is this by design or is
it a bug?

Doing an samba_dnsupdate results into:
ERROR(runtime): uncaught exception - (9711,
'WERR_DNS_ERROR_RECORD_ALREADY_EXISTS')
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line
176, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/dns.py", line 940, in
run
    raise e
Failed update of 39 entries

So how to get rid of the dns entry of the removed interface?

Thanks in advance


More information about the samba mailing list