[Samba] [samba4] Print all dns records of the samba4 internal DNS server

François Lafont flafdivers at free.fr
Sun Apr 7 07:46:11 MDT 2013

[Sorry, I think I have missed my sending message]

Le 07/04/2013 14:26, David Adam a écrit :
> On Sun, 7 Apr 2013, François Lafont wrote:
>> All is in the title. I'm using Samba4 (version 4.0.4) in Debian Wheezy 
>> with the builtin DNS server. I'm searching a command to print all the 
>> dns records. I have searched in "samba-tool" command but I haven't 
>> found.
> https://lists.samba.org/archive/samba-technical/2013-February/090300.html
> samba-tool dns query localhost yourdomain.lan @ ALL

Thank you David. This this perfect for me. I have used:

samba-tool dns query localhost chezmoi.priv @ ALL -U administrator

Just one detail, the command don't print all the dns records:

~# samba-tool dns query localhost chezmoi.priv @ ALL -U administrator
Password for [CHEZMOI\administrator]:
  Name=, Records=4, Children=0
    SOA: serial=8, refresh=900, retry=600, expire=86400, ns=wheezy-server.chezmoi.priv., email=hostmaster.chezmoi.priv. (flags=600000f0, serial=8, ttl=3600)
    NS: wheezy-server.chezmoi.priv. (flags=600000f0, serial=1, ttl=900)
    A: (flags=600000f0, serial=1, ttl=900)
    A: (flags=600000f0, serial=110, ttl=900)
  Name=_msdcs, Records=0, Children=0
  Name=_sites, Records=0, Children=1
  Name=_tcp, Records=0, Children=4
  Name=_udp, Records=0, Children=2
  Name=alexandrie, Records=1, Children=0
    CNAME: wheezy-2.chezmoi.priv. (flags=f0, serial=8, ttl=900)
  Name=DomainDnsZones, Records=0, Children=2
  Name=ForestDnsZones, Records=0, Children=2
  Name=wheezy-2, Records=1, Children=0
    A: (flags=f0, serial=110, ttl=900)
  Name=wheezy-server, Records=1, Children=0
    A: (flags=f0, serial=1, ttl=900)
  Name=WIN7PC, Records=1, Children=0
    A: (flags=f0, serial=110, ttl=1200)
  Name=WIN7PC-2, Records=1, Children=0
    A: (flags=f0, serial=110, ttl=1200)

But, for example, I have a CNAME record which isn't print by the commad:

~# dig e55fe667-c95d-4189-acb4-7ad10aee13f3._msdcs.chezmoi.priv CNAME

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> e55fe667-c95d-4189-acb4-7ad10aee13f3._msdcs.chezmoi.priv CNAME
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63547
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;e55fe667-c95d-4189-acb4-7ad10aee13f3._msdcs.chezmoi.priv. IN CNAME

e55fe667-c95d-4189-acb4-7ad10aee13f3._msdcs.chezmoi.priv. 900 IN CNAME wheezy-server.chezmoi.priv.

;; Query time: 0 msec
;; WHEN: Sun Apr  7 15:37:10 2013
;; MSG SIZE  rcvd: 102

François Lafont

More information about the samba mailing list