(The following is with samba 4.5.2 from source under ubuntu 16.04) If I query for '@' I get the whole zone, including records at the zone apex (e.g. SOA, NS) and children: root at wrn-dc1:~# samba-tool dns query wrn-dc1 int.example.net '@' all Name=, Records=2, Children=0 SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns=wrn-dc1.ad.example.net., email=hostmaster.ad.example.net. (flags=600000f0, serial=2, ttl=3600) NS: wrn-dc1.ad.example.net. (flags=600000f0, serial=1, ttl=3600) Name=_kerberos, Records=1, Children=0 TXT: "IPA.EXAMPLE.NET" (flags=f0, serial=2, ttl=900) That's fine. Note that the records at the zone apex have "Name=" (empty string) which is as expected. However if I want *only* the zone apex records, and I try to query for the empty string, I get an exception: root at wrn-dc1:~# samba-tool dns query wrn-dc1 int.example.net '' ns ERROR(runtime): uncaught exception - (9714, 'WERR_DNS_ERROR_NAME_DOES_NOT_EXIST') File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run return self.run(*args, **kwargs) File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/dns.py", line 998, in run None, record_type, select_flags, None, None) Is this expected? How can I query just the NS records at the zone apex? Thanks, Brian.
mathias dufresne
2016-Dec-15 16:31 UTC
[Samba] samba-tool dns query - querying the zone apex
2016-12-12 12:53 GMT+01:00 Brian Candler via samba <samba at lists.samba.org>:> (The following is with samba 4.5.2 from source under ubuntu 16.04) > > If I query for '@' I get the whole zone, including records at the zone > apex (e.g. SOA, NS) and children: > > root at wrn-dc1:~# samba-tool dns query wrn-dc1 int.example.net '@' all > Name=, Records=2, Children=0 > SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns> wrn-dc1.ad.example.net., email=hostmaster.ad.example.net. > (flags=600000f0, serial=2, ttl=3600) > NS: wrn-dc1.ad.example.net. (flags=600000f0, serial=1, ttl=3600) > Name=_kerberos, Records=1, Children=0 > TXT: "IPA.EXAMPLE.NET" (flags=f0, serial=2, ttl=900) > > That's fine. Note that the records at the zone apex have "Name=" (empty > string) which is as expected. > > However if I want *only* the zone apex records, and I try to query for the > empty string, I get an exception: > > root at wrn-dc1:~# samba-tool dns query wrn-dc1 int.example.net '' ns > ERROR(runtime): uncaught exception - (9714, 'WERR_DNS_ERROR_NAME_DOES_NOT_ > EXIST') > File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py", > line 176, in _run > return self.run(*args, **kwargs) > File "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/dns.py", > line 998, in run > None, record_type, select_flags, None, None) > > Is this expected? How can I query just the NS records at the zone apex? >Use "dig": dig -t NS int.example.net> > Thanks, > > Brian. > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba