I have some records in bind for my DNS zone. Now I want to configure Samba4 Active Directory which wants to add some dynamic records into my zone. So I include /var/lib/samba/private/named.conf in my /etc/bind/named.conf. Problem is that same zone is defined statically and dynamically. It leads to error:
named[8992]: generating session key for dynamic DNS
named[8992]: sizing zone task pool based on 24 zones
named[8992]: Loading 'AD DNS Zone' using driver dlopen
named[8992]: samba_dlz: started for DN DC=myzone,DC=cz
named[8992]: samba_dlz: starting configure
named[8992]: samba_dlz: Failed to configure zone 'myzone.cz'
named[8992]: loading configuration: already exists
named[8992]: exiting (due to fatal error)
named[8992]: samba_dlz: shutting down
named.conf:
view "internal" {
zone "myzone.cz" {
type master;
file "/etc/bind/zones/internal/myzone.cz.db";
};
include "/var/lib/samba/private/named.conf";
}
/var/lib/samba/private/named.conf:
dlz "AD DNS Zone" {
# For BIND 9.9.0
database "dlopen /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_9.so";
};
How should I configure that to have static and Samba-dynamic DNS records? Thanks.
My solution was to simply remove the bind 'zone' entry and let samba have control. I assume they would be conflicting anyway. If you look on the samba docs site.. https://wiki.samba.org/index.php/Setup_a_basic_BIND_installation
You will see that they leave out any extra zones other than the 'localhost' ones.
In order to manage the Samba zone, you can use a couple things (I'm sure there are others):
dnsmgmt.msc
command on Windowssamba-tool
command on LinuxThere is a good run-down on how to use these tools to manage the Samba zones on the Samba website.