[Samba] How to create an NS record

Bob Wooden bob at donelsontrophy.com
Mon Jun 8 14:16:43 UTC 2020


My dns (bind9) server for my Samba AD has messed up. W10 workstations 
are having connection issues to say the least.

When I dig into the Sambawiki documentation regarding 
/BIND9_DLZ_DNS_Back_End/ the first thing I notice is the change that 
occurred at Samba v4.8.0. That is the change of 
"|/usr/local/samba/_private_/named.conf|" to 
"|/usr/local/samba/_bind-dns_/named.conf|". This DC started life as a 
v4.7.6. I find within the directory tree both ".../samba/bind-dns /..." 
AND "...samba/private/..." entries. So, when I verify the "metadata.tdb" 
database I get:

    root at ORGdc07:~# ls -lai /usr/local/samba/*private*/sam.ldb.d/
    total 75732
    26611 drwxr-x--- 2 root bind     4096 Jun  8 08:38  .
    17275 drwx------ 7 root root     4096 Jun  8 08:38  ..
    26617 -rw------- 1 root root 25698304 Jun  7 13:18
    'CN=CONFIGURATION,DC=domainname,DC=ORG.ldb'
    26616 -rw------- 1 root root 31580160 Jun  7 13:18
    'CN=SCHEMA,CN=CONFIGURATION,DC=domainname,DC=ORG.ldb'
    26637 -rw-rw---- 2 root bind  4247552 Jun  8 07:53
    'DC=DOMAINDNSZONES,DC=domainname,DC=ORG.ldb'
    26636 -rw------- 1 root root 10928128 Jun  8 06:34
    'DC=domainname,DC=ORG.ldb'
    26638 -rw-rw---- 2 root bind  4247552 Jun  7 16:04
    'DC=FORESTDNSZONES,DC=domainname,DC=ORG.ldb'
    26615 -rw-rw---- 2 root bind   831488 Jun  8 07:53 metadata.tdb

    But nothing here:

    root at ORGdc07:~# ls -lai /usr/local/samba/*bind-dns*/sam.ldb.d/
    ls: cannot access '/usr/local/samba/bind-dns/sam.ldb.d/': No such
    file or directory

    And nothing here:

    root at ORGdc07:~# ls -lai /usr/local/samba/*private*/dns/sam.ldb.d/
    ls: cannot access '/usr/local/samba/private/dns/sam.ldb.d/': No such
    file or directory

    And something here:

    root at ORGdc07:~# ls -lai /usr/local/samba/*bind-dns*/dns/sam.ldb.d/
    total 25712
    524524 drwxrwx--- 2 root bind    4096 Jun  8 08:38  .
    524523 drwxrwx--- 3 root bind    4096 Jun  8 08:38  ..
        972 -rw-rw---- 1 root bind 7196672 Jun  8 08:38
    'CN=CONFIGURATION,DC=domainname,DC=ORG.ldb'
        794 -rw-rw---- 1 root bind 8503296 Jun  8 08:38
    'CN=SCHEMA,CN=CONFIGURATION,DC=domainname,DC=ORG.ldb'
      26637 -rw-rw---- 2 root bind 4247552 Jun  8 07:53
    'DC=DOMAINDNSZONES,DC=domainname,DC=ORG.ldb'
    524525 -rw-rw---- 1 root bind 1286144 Jun  8 08:38
    'DC=domainname,DC=ORG.ldb'
      26638 -rw-rw---- 2 root bind 4247552 Jun  7 16:04
    'DC=FORESTDNSZONES,DC=domainname,DC=ORG.ldb'
      26615 -rw-rw---- 2 root bind  831488 Jun  8 07:53 metadata.tdb

I am having problems with host lookups and if I am understanding what I 
am reading on "https://wiki.samba.org/index.php/BIND9_DLZ_DNS_Back_End" 
page, under the header "New DNS Entries Are Not Resolvable" The above 
should be under one or the other NOT a mix across both directories.

When I do:

    root at host7:~# host -v host7.domainname.org
    Trying "host7.domainname.org"
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13526
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;host7.domainname.org.        IN    A

    ;; ANSWER SECTION:
    host7.domainname.org.    0    IN    A    192.168.160.48

    Received 50 bytes from 127.0.0.53#53 in 0 ms
    Trying "host7.domainname.org"
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6427
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;host7.domainname.org.        IN    AAAA

    Received 34 bytes from 127.0.0.53#53 in 0 ms
    Trying "host7.domainname.org"
    *Host host7.domainname.org _not found: 3(NXDOMAIN)_*
    Received 34 bytes from 127.0.0.53#53 in 0 ms
    Received 34 bytes from 127.0.0.53#53 in 0 ms

Remember that I mentioned that this machine started life as a v4.7.6. 
There have been many version upgrades since and I am now at v4.11.6. (I 
am surprised dns did not fail sooner but, what do I know?)

So, I could be wrong but, I think the "not found: 3(NXDOMAIN)" issue is 
being caused, in part, by the old "private" directory to the new 
"bind-dns" directory issue?

I have worked through my old setup notes and change all the "private" to 
"bind-dns" but I am still having issues.

How can I correct this?

Any suggestions would be greatly appreciated.

-- 
(Sent from home location.)

Bob Wooden



More information about the samba mailing list