Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] DNS record info (samba-tool)

1,837 views
Skip to first unread message

Stuart Naylor

unread,
Apr 8, 2014, 12:10:04 PM4/8/14
to
Even though you can create and delete DNS records I have been puzzling how you list records that might be in a zone?

samba-tool dns add SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa 32 PTR SAMBA1.SAMBA4.LAN --username=administrator

say the above adds a record to 1.168.192.in-addr.arpa even if I do a zoneinfo on 1.168.192.in-addr.arpa

pszZoneName                 : 1.168.192.in-addr.arpa
  dwZoneType                  : DNS_ZONE_TYPE_PRIMARY
  fReverse                    : TRUE
  fAllowUpdate                : DNS_ZONE_UPDATE_SECURE
  fPaused                     : FALSE
  fShutdown                   : FALSE
  fAutoCreated                : FALSE
  fUseDatabase                : TRUE
  pszDataFile                 : None
  aipMasters                  : []
  fSecureSecondaries          : DNS_ZONE_SECSECURE_NO_XFER
  fNotifyLevel                : DNS_ZONE_NOTIFY_LIST_ONLY
  aipSecondaries              : []
  aipNotify                   : []
  fUseWins                    : FALSE
  fUseNbstat                  : FALSE
  fAging                      : FALSE
  dwNoRefreshInterval         : 168
  dwRefreshInterval           : 168
  dwAvailForScavengeTime      : 0
  aipScavengeServers          : []
  dwRpcStructureVersion       : 0x2
  dwForwarderTimeout          : 0
  fForwarderSlave             : 0
  aipLocalMasters             : []
  dwDpFlags                   : DNS_DP_AUTOCREATED DNS_DP_DOMAIN_DEFAULT DNS_DP_ENLISTED
  pszDpFqdn                   : DomainDnsZones.samba4.lan
  pwszZoneDn                  : DC=1.168.192.in-addr.arpa,CN=MicrosoftDNS,DC=DomainDnsZones,DC=samba4,DC=lan
  dwLastSuccessfulSoaCheck    : 0
  dwLastSuccessfulXfr         : 0
  fQueuedForBackgroundLoad    : FALSE
  fBackgroundLoadInProgress   : FALSE
  fReadOnlyZone               : FALSE
  dwLastXfrAttempt            : 0
  dwLastXfrResult             : 0

But if I wanted to browse and delete a record how do I do it?



-----Original message-----
> From:samba-...@lists.samba.org <samba-...@lists.samba.org>
> Sent: Monday 7th April 2014 19:00
> To: sa...@lists.samba.org
> Subject: samba Digest, Vol 136, Issue 8
>
> Send samba mailing list submissions to
> sa...@lists.samba.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.samba.org/mailman/listinfo/samba
> or, via email, send a message with subject or body 'help' to
> samba-...@lists.samba.org
>
> You can reach the person managing the list at
> samba...@lists.samba.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of samba digest..."
> Today's Topics:
>
>    1. Samba documentation team meeting reminder (Marc Muehlfeld)
>    2. Re: samba 4.1 CTDB (Klaus Hartnegg)
>    3. Re: changing server role = standalone server to 'member
>       server' (Andrew Bartlett)
>    4. Re: samba 4.1 CTDB (Sabuj Pattanayek)
>    5. DNS - block ip of second nic (Andreas Grabner)
>    6. Re: samba 4.1 CTDB (Taylor, Jonn)
>    7. Re: samba-tool illegal instruction setting up Kerberos auth
>       for http (Rowland Penny)
>    8. Re: winbind bug? (Rowland Penny)
>    9. Re: winbind bug? (Doug Tucker)
>   10. Re: DNS - block ip of second nic (Marc Muehlfeld)
>   11. Re: winbind bug? (Rowland Penny)
>   12. Re: winbind bug? (Doug Tucker)
>   13. Re: winbind bug? (Rowland Penny)
>   14. Re: winbind wiki ( and extra sernet info conserning winbind )
>       (Marc Muehlfeld)
>   15. Re: winbind bug? (Doug Tucker)
>   16. Re: DNS - block ip of second nic (Andreas Grabner)
>   17. Re: winbind bug? (Rowland Penny)
> _______________________________________________
> samba mailing list
> sa...@lists.samba.org
> https://lists.samba.org/mailman/listinfo/samba
>
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Marc Muehlfeld

unread,
Apr 8, 2014, 1:00:02 PM4/8/14
to
Hello Stuart,

Am 08.04.2014 18:08, schrieb Stuart Naylor:
> But if I wanted to browse and delete a record how do I do it?


Have you seen
https://wiki.samba.org/index.php/DNS_Administration



Regards,
Marc

Stuart Naylor

unread,
Apr 8, 2014, 1:10:01 PM4/8/14
to
root@samba1:~# samba-tool dns query SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa @ ALL --username=administrator Password for [SAMBA4\administrator]:
Name=, Records=2, Children=0
SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns=samba1.samba4.lan., email=hostmaster.samba4.lan. (flags=600000f0, serial=2, ttl=3600)
NS: samba1.samba4.lan. (flags=600000f0, serial=1, ttl=3600)
Name=32, Records=1, Children=0
PTR: SAMBA1.SAMBA4.LAN (flags=f0, serial=2, ttl=900)


@ ALL seems to do it.
trying to use samba-tool and not the RSAT tools.

any more info anyone?

Thanks

Stuart

Marc Muehlfeld

unread,
Apr 8, 2014, 1:30:01 PM4/8/14
to
Am 08.04.2014 19:08, schrieb Stuart Naylor:
> root@samba1:~# samba-tool dns query SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa @ ALL --username=administrator Password for [SAMBA4\administrator]:
> Name=, Records=2, Children=0
> SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns=samba1.samba4.lan., email=hostmaster.samba4.lan. (flags=600000f0, serial=2, ttl=3600)
> NS: samba1.samba4.lan. (flags=600000f0, serial=1, ttl=3600)
> Name=32, Records=1, Children=0
> PTR: SAMBA1.SAMBA4.LAN (flags=f0, serial=2, ttl=900)
>
>
> @ ALL seems to do it.
> trying to use samba-tool and not the RSAT tools.

The Wiki HowTo describes both.



> any more info anyone?

What exactly are you missing?

Günter Kukkukk

unread,
Apr 8, 2014, 2:30:01 PM4/8/14
to
Am 08.04.2014 19:08, schrieb Stuart Naylor:
> root@samba1:~# samba-tool dns query SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa @ ALL --username=administrator Password for [SAMBA4\administrator]:
> Name=, Records=2, Children=0
> SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns=samba1.samba4.lan., email=hostmaster.samba4.lan. (flags=600000f0, serial=2, ttl=3600)
> NS: samba1.samba4.lan. (flags=600000f0, serial=1, ttl=3600)
> Name=32, Records=1, Children=0
> PTR: SAMBA1.SAMBA4.LAN (flags=f0, serial=2, ttl=900)
>
>
> @ ALL seems to do it.
> trying to use samba-tool and not the RSAT tools.
>
> any more info anyone?
>
> Thanks
>
> Stuart
>
>
>
>
> -----Original message-----
>> From:Marc Muehlfeld <sa...@marc-muehlfeld.de>
>> Sent: Tuesday 8th April 2014 17:55
>> To: Stuart Naylor <stuarti...@thursbygarden.org>; sa...@lists.samba.org
>> Subject: Re: [Samba] DNS record info (samba-tool)
>>
>> Hello Stuart,
>>
>> Am 08.04.2014 18:08, schrieb Stuart Naylor:
>>> But if I wanted to browse and delete a record how do I do it?
>>
>>
>> Have you seen
>> https://wiki.samba.org/index.php/DNS_Administration
>>
>>
>>
>> Regards,
>> Marc
>>

Are you using the internal samba dns server?
If so, you need to restart samba after adding a dns zone. The zone was
added with rpc calls to the directory, but the dns server doesn't
notice this atm .
Note - also with the bind dlz module, sometimes wrong results have been seen
after adding a zone. So one might also here need to restart bind/samba.

Cheers, Günter

--

Stuart Naylor

unread,
Apr 8, 2014, 2:30:02 PM4/8/14
to
Its just not that clear and managed to guesstimate that command from googling and playing.

Anyone got any info on the samba-tool dns methods especially records.

If have got @ ALL for a zone query.

Then the documentation gives a dns add as samba-tool dns add SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa 32 PTR SAMBA1.SAMBA4.LAN --username=administrator

whilst the command line gives Usage: samba-tool dns add <server> <zone> <name> <A|AAAA|PTR|CNAME|NS|MX|SRV|TXT> <data>

which maybe its me but I know the above works but looking at the CLI I am wondering how?

Stuart





-----Original message-----
> From:Marc Muehlfeld <sa...@marc-muehlfeld.de>
> Sent: Tuesday 8th April 2014 18:28
> To: Stuart Naylor <stuarti...@thursbygarden.org>; sa...@lists.samba.org
> Subject: Re: [Samba] DNS record info (samba-tool)
>
> Am 08.04.2014 19:08, schrieb Stuart Naylor:
> > root@samba1:~# samba-tool dns query SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa @ ALL --username=administrator Password for [SAMBA4\administrator]:
> > Name=, Records=2, Children=0
> > SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns=samba1.samba4.lan., email=hostmaster.samba4.lan. (flags=600000f0, serial=2, ttl=3600)
> > NS: samba1.samba4.lan. (flags=600000f0, serial=1, ttl=3600)
> > Name=32, Records=1, Children=0
> > PTR: SAMBA1.SAMBA4.LAN (flags=f0, serial=2, ttl=900)
> >
> >
> > @ ALL seems to do it.
> > trying to use samba-tool and not the RSAT tools.
>
> The Wiki HowTo describes both.
>
>
>
> > any more info anyone?
>
> What exactly are you missing?
>
>
> Regards,
> Marc
>
>

Stuart Naylor

unread,
Apr 8, 2014, 2:40:02 PM4/8/14
to
Thanks Gunter,

I am keeping to the internal, I am not a fan of bind in this scenario.

Gunter so even though it lists that is just an RPC call but actually the working record needs a restart?

I am trying to do a webmin module for Samba4 rather than use any RSAT tools.

The DNS part is a little confusing :)

Stuart



-----Original message-----
> From:Günter Kukkukk <li...@kukkukk.com>
> Sent: Tuesday 8th April 2014 19:15
> To: Stuart Naylor <stuarti...@thursbygarden.org>; Marc Muehlfeld <sa...@marc-muehlfeld.de>; sa...@lists.samba.org
> Subject: Re: [Samba] DNS record info (samba-tool)
>
> Am 08.04.2014 19:08, schrieb Stuart Naylor:
> > root@samba1:~# samba-tool dns query SAMBA1.SAMBA4.LAN 1.168.192.in-addr.arpa @ ALL --username=administrator Password for [SAMBA4\administrator]:
> > Name=, Records=2, Children=0
> > SOA: serial=2, refresh=900, retry=600, expire=86400, minttl=3600, ns=samba1.samba4.lan., email=hostmaster.samba4.lan. (flags=600000f0, serial=2, ttl=3600)
> > NS: samba1.samba4.lan. (flags=600000f0, serial=1, ttl=3600)
> > Name=32, Records=1, Children=0
> > PTR: SAMBA1.SAMBA4.LAN (flags=f0, serial=2, ttl=900)
> >
> >
> > @ ALL seems to do it.
> > trying to use samba-tool and not the RSAT tools.
> >

> > any more info anyone?
> >
> > Thanks
> >

> > Stuart
> >
> >
> >
> >
> > -----Original message-----
> >> From:Marc Muehlfeld <sa...@marc-muehlfeld.de>
> >> Sent: Tuesday 8th April 2014 17:55
> >> To: Stuart Naylor <stuarti...@thursbygarden.org>; sa...@lists.samba.org
> >> Subject: Re: [Samba] DNS record info (samba-tool)
> >>

> >> Hello Stuart,
> >>
> >> Am 08.04.2014 18:08, schrieb Stuart Naylor:
> >>> But if I wanted to browse and delete a record how do I do it?
> >>
> >>
> >> Have you seen
> >> https://wiki.samba.org/index.php/DNS_Administration
> >>
> >>
> >>
> >> Regards,
> >> Marc
> >>
>
> Are you using the internal samba dns server?
> If so, you need to restart samba after adding a dns zone. The zone was
> added with rpc calls to the directory, but the dns server doesn't
> notice this atm .
> Note - also with the bind dlz module, sometimes wrong results have been seen
> after adding a zone. So one might also here need to restart bind/samba.
>
> Cheers, Günter
>
> --
>
>

Günter Kukkukk

unread,
Apr 8, 2014, 3:30:02 PM4/8/14
to
Am 08.04.2014 20:31, schrieb Stuart Naylor:
> Thanks Gunter,
>
> I am keeping to the internal, I am not a fan of bind in this scenario.
>
> Gunter so even though it lists that is just an RPC call but actually the working record needs a restart?
>
> I am trying to do a webmin module for Samba4 rather than use any RSAT tools.
>
> The DNS part is a little confusing :)
>
> Stuart

there are (at least) 2 ways to manipulate samba (windows) dns entries:
- using dce/rpc calls to modify the AD directory directly
(e.g. used by samba-tool, MS DNS Manager GUI, ...)
- using dynamic DNS
(e.g. ISC nsupdate, MS ipconfig /registerdns, ...)

When samba starts, the internal dns server reads all currently defined
zones (from ADS) - and the containing dns records - into its _own_ data structures.

When a new zone is added, the dce/rpc tools will show it,
but the internal dns must be restarted.

When you then add new records to any now existing zone, the dns server
will also track them. So no samba restart is needed.

Cheers, Günter

0 new messages