Christopher Wooley
2019-Sep-22 00:08 UTC
[Samba] bind-dns Folder Missing for Samba4 Setup in Ubuntu
I am trying to setup samba to use the bind9 backend, but a folder is missing in Samba, according to the WIKI page. This seems to be consistent, as there are several files and folders that are not where they should be, according to the wiki: https://wiki.samba.org/index.php/BIND9_DLZ_DNS_Back_End That page says there should be a folder at /usr/local/samba/bind-dns, but it's not there. I've searched the entire root directory, but the bind-dns folder doesn't exist. Anyone know where it is in Ubuntu and can you explain its purpose?
Rowland penny
2019-Sep-22 07:59 UTC
[Samba] bind-dns Folder Missing for Samba4 Setup in Ubuntu
On 22/09/2019 01:08, Christopher Wooley via samba wrote:> I am trying to setup samba to use the bind9 backend, but a folder is > missing in Samba, according to the WIKI page. This seems to be consistent, > as there are several files and folders that are not where they should be, > according to the wiki: > https://wiki.samba.org/index.php/BIND9_DLZ_DNS_Back_End > > That page says there should be a folder at /usr/local/samba/bind-dns, but > it's not there. I've searched the entire root directory, but the bind-dns > folder doesn't exist. Anyone know where it is in Ubuntu and can you explain > its purpose?Have you compiled Samba yourself ? If not, it should be wherever your distro puts Samba e.g. /var/lib/samba on Debian based distros. The 'bind-dns' directory will not exist until one of these three things happen: You provision Samba with the '--dns-backend=BIND9_DLZ' option You join a DC with the '--dns-backend=BIND9_DLZ' option you upgrade to Bind9 with 'samba_upgradedns' and the '--dns-backend=BIND9_DLZ' option Rowland
Rowland penny
2019-Sep-22 12:19 UTC
[Samba] bind-dns Folder Missing for Samba4 Setup in Ubuntu
On 22/09/2019 13:08, Christopher Wooley wrote:> I used the distro's compilation, samba -V : Version 4.7.6-Ubuntu, but > I think it's already running DLZ. I know I recompiled Bind9 in order > to add the DLZ necessary flags.Then you were wasting your time, Ubuntu's Bind9 is already DLZ capable> > samba_upgradedns --dns-backend=BIND9_DLZ > Reading domain information > DNS accounts already exist > No zone file /var/lib/samba/private/dns/LOCAL.****.COM.zone > DNS records will be automatically created > DNS partitions already exist > dns-sbs-server account already exists > See /var/lib/samba/private/named.conf for an example configuration > include file for BIND > and /var/lib/samba/private/named.txt for further documentation > required for secure DNS updates > Finished upgrading DNS > > I included?/var/lib/samba/private/named.conf in the > /etc/bind/named.conf configuration file... > include "/var/lib/samba/private/named.conf"; > Which contains... > dlz "AD DNS Zone" { > ? ? # For BIND 9.8.x > ? ? # database "dlopen > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9.so"; > > ? ? # For BIND 9.9.x > ? ? # database "dlopen > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_9.so"; > > ? ? # For BIND 9.10.x > ? ? # database "dlopen > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_10.so"; > > ? ? # For BIND 9.11.x > ? ? ?database "dlopen > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_11.so"; > }; > > /usr/lib/x86_64-linux-gnu/samba/bind9# ls -l > -rw-r--r-- 1 bind bind 38904 May 23 12:06 dlz_bind9_11.so > > I also ensured that bind is able to create files in the > /var/lib/samba/private/dns folder... > /var/lib/samba/private/dns# sudo -u bind nano test > /var/lib/samba/private/dns# ls -l > total 2956 > -rw-rw---- 1 root bind 3014656 Sep 22 11:52 sam.ldb > drwxrwx--- 2 root bind ? ?4096 Sep 22 11:52 sam.ldb.d > -rw-r--r-- 1 bind bind ? ? ? 5 Sep 22 11:55 test > > After this, I performed another search for bind-dns and still found > nothing. > /# find . -iname bind-dns > /#That is because it will never exist on 4.7.6, I told you in my last post, it was introduced from 4.8.0 If you really want the 'bind-dns' directory and to stop using an EOL (as far as Samba is concerned) version of Samba, see here: http://apt.van-belle.nl/ Rowland
Christopher Wooley
2019-Sep-22 16:20 UTC
[Samba] bind-dns Folder Missing for Samba4 Setup in Ubuntu
On Sun, Sep 22, 2019 at 7:19 AM Rowland penny via samba < samba at lists.samba.org> wrote:> On 22/09/2019 13:08, Christopher Wooley wrote: > > I used the distro's compilation, samba -V : Version 4.7.6-Ubuntu, but > > I think it's already running DLZ. I know I recompiled Bind9 in order > > to add the DLZ necessary flags. > Then you were wasting your time, Ubuntu's Bind9 is already DLZ capable > > > > samba_upgradedns --dns-backend=BIND9_DLZ > > Reading domain information > > DNS accounts already exist > > No zone file /var/lib/samba/private/dns/LOCAL.****.COM.zone > > DNS records will be automatically created > > DNS partitions already exist > > dns-sbs-server account already exists > > See /var/lib/samba/private/named.conf for an example configuration > > include file for BIND > > and /var/lib/samba/private/named.txt for further documentation > > required for secure DNS updates > > Finished upgrading DNS > > > > I included /var/lib/samba/private/named.conf in the > > /etc/bind/named.conf configuration file... > > include "/var/lib/samba/private/named.conf"; > > Which contains... > > dlz "AD DNS Zone" { > > # For BIND 9.8.x > > # database "dlopen > > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9.so"; > > > > # For BIND 9.9.x > > # database "dlopen > > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_9.so"; > > > > # For BIND 9.10.x > > # database "dlopen > > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_10.so"; > > > > # For BIND 9.11.x > > database "dlopen > > /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_11.so"; > > }; > > > > /usr/lib/x86_64-linux-gnu/samba/bind9# ls -l > > -rw-r--r-- 1 bind bind 38904 May 23 12:06 dlz_bind9_11.so > > > > I also ensured that bind is able to create files in the > > /var/lib/samba/private/dns folder... > > /var/lib/samba/private/dns# sudo -u bind nano test > > /var/lib/samba/private/dns# ls -l > > total 2956 > > -rw-rw---- 1 root bind 3014656 Sep 22 11:52 sam.ldb > > drwxrwx--- 2 root bind 4096 Sep 22 11:52 sam.ldb.d > > -rw-r--r-- 1 bind bind 5 Sep 22 11:55 test > > > > After this, I performed another search for bind-dns and still found > > nothing. > > /# find . -iname bind-dns > > /# > > That is because it will never exist on 4.7.6, I told you in my last > post, it was introduced from 4.8.0 > > If you really want the 'bind-dns' directory and to stop using an EOL (as > far as Samba is concerned) version of Samba, see here: > > http://apt.van-belle.nl/ > > Rowland > >Thank you, I didn't realize the version of Samba was so old, in the Ubuntu 18 repos. I found a different PPA and upgraded to 4.10.8. After restarting the service, it created the folder. I use Webmin to manage DNS, so one thing I'm confused about is, will Samba be adding the zones so they will be manageable by bind and Webmin or will I have to use samba-tool to manage the local AD's DNS? Samba isn't creating zone files, like Bind, they don't show up in Bind's Webmin module and I can't find any files that are being created by Samba that look like Bind's zone files. $ttl 38400 example.com. IN SOA ns1. example.example.com. ( 1569168606 10800 3600 604800 38400 ) example.com. IN NS ns1. ns1.example.com. IN A 192.168.15.52 example.com. IN A 192.168.15.52
Maybe Matching Threads
- Samba + BIND9 DLZ. DNS dosen't resolve FQDN, only short hostname
- Phantom DNS records visible with dig, but not samba-tool dns
- Authentication to Secondary Domain Controller initially fails when PDC is offline
- which DNS backend ?
- Authentication to Secondary Domain Controller initially fails when PDC is offline