Billy Bob
2019-Jan-10 20:07 UTC
[Samba] samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
On Thursday, January 10, 2019 1:43 PM, Rowland Penny via samba <samba at lists.samba.org> wrote: >On Thu, 10 Jan 2019 19:09:01 +0000 (UTC)>Billy Bob via samba <samba at lists.samba.org> wrote: > > >> >> As to the current issue, I am attemting to configure DHCP to update >> DNS records with BIND9, as outlined in the Samba Wiki (with >> correction of a couple errors in the "on release" and "on expiry" >> sections of the example dhcpd.conf file). > >What errors ?In "on expiry" changed: execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, "", "0"); to execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, "0", ""); and in on release (this one not really an error) gave execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, ClientDHCID); a default null value for ClientName, as follows execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, ClientDHCID, "");>Do you want to change your scripts to match my scripts as found on the >wiki ? >I know they work, well they have for me for the last 6 years.I am not opposed to starting over with it. "My" script is just a copy of the Wiki script with variables populated according to the values for the server. Perhaps those values are not the same, test conditions are different ... I don't know. It did work on prior incarnation of DC. Also the logs looked much more like those below, and the updates were being made.>> =================================== ERRORS > >It is supposed to look like this: > >Jan 10 19:36:41 dc4 dhcpd[2093]: Commit: IP: 192.168.0.55 DHCID: 1:b8:27:eb:d3:31:81 Name: devuan >Jan 10 19:36:41 dc4 dhcpd[2093]: execute_statement argv[0] = /usr/local/bin/dhcp-dyndns.sh >Jan 10 19:36:41 dc4 dhcpd[2093]: execute_statement argv[1] = add >Jan 10 19:36:41 dc4 dhcpd[2093]: execute_statement argv[2] = 192.168.0.55 >Jan 10 19:36:41 dc4 dhcpd[2093]: execute_statement argv[3] = 1:b8:27:eb:d3:31:81 >Jan 10 19:36:41 dc4 dhcpd[2093]: execute_statement argv[4] = devuan >Jan 10 19:36:41 dc4 named[2336]: samba_dlz: starting transaction on zone samdom.example.com >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: allowing update of signer=dhcpduser\@SAMDOM.EXAMPLE.COM >name=devuan.samdom.example.com tcpaddr=127.0.0.1 type=A key=4044813655.sig-dc4.samdom.example.com/160/0 >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: allowing update of signer=dhcpduser\@SAMDOM.EXAMPLE.COM >name=devuan.samdom.example.com tcpaddr=127.0.0.1 type=A key=4044813655.sig-dc4.samdom.example.com/160/0 >Jan 10 19:36:42 dc4 named[2336]: client 127.0.0.1#55675/key dhcpduser\@SAMDOM.EXAMPLE.COM: updating zone >'samdom.example.com/NONE': deleting rrset at 'devuan.samdom.example.com' A >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: subtracted rdataset devuan.samdom.example.com >'devuan.samdom.example.com.#0113600#011IN#011A#011192.168.0.55' >Jan 10 19:36:42 dc4 named[2336]: client 127.0.0.1#55675/key dhcpduser\@SAMDOM.EXAMPLE.COM: updating zone >'samdom.example.com/NONE': adding an RR at 'devuan.samdom.example.com' A 192.168.0.55 >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: added rdataset devuan.samdom.example.com >'devuan.samdom.example.com.#0113600#011IN#011A#011192.168.0.55' >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: committed transaction on zone samdom.example.com >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: starting transaction on zone 0.168.192.in-addr.arpa >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: allowing update of signer=dhcpduser\@SAMDOM.EXAMPLE.COM >name=55.0.168.192.in-addr.arpa tcpaddr=127.0.0.1 type=PTR key=4072256449.sig-dc4.samdom.example.com/160/0 >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: allowing update of signer=dhcpduser\@SAMDOM.EXAMPLE.COM >name=55.0.168.192.in-addr.arpa tcpaddr=127.0.0.1 type=PTR key=4072256449.sig-dc4.samdom.example.com/160/0 >Jan 10 19:36:42 dc4 named[2336]: client 127.0.0.1#46009/key dhcpduser\@SAMDOM.EXAMPLE.COM: updating zone >'0.168.192.in-addr.arpa/NONE': deleting rrset at '55.0.168.192.in-addr.arpa' PTR >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: subtracted rdataset 55.0.168.192.in-addr.arpa '55.0.168.192.in->addr.arpa.#0113600#011IN#011PTR#011devuan.samdom.example.com.' >Jan 10 19:36:42 dc4 named[2336]: client 127.0.0.1#46009/key dhcpduser\@SAMDOM.EXAMPLE.COM: updating zone >'0.168.192.in-addr.arpa/NONE': adding an RR at '55.0.168.192.in-addr.arpa' PTR devuan.samdom.example.com. >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: added rdataset 55.0.168.192.in-addr.arpa '55.0.168.192.in->addr.arpa.#0113600#011IN#011PTR#011devuan.samdom.example.com.' >Jan 10 19:36:42 dc4 named[2336]: samba_dlz: committed transaction on zone 0.168.192.in-addr.arpa >Jan 10 19:36:42 dc4 root: DHCP-DNS Update succeeded >Jan 10 19:36:42 dc4 dhcpd[2093]: DHCPREQUEST for 192.168.0.55 from b8:27:eb:d3:31:81 (devuan) via eth0 >Jan 10 19:36:42 dc4 dhcpd[2093]: DHCPACK on 192.168.0.55 to b8:27:eb:d3:31:81 (devuan) via eth0 > >Yours looks nothing like that>>Rowland-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Billy Bob
2019-Jan-10 20:18 UTC
[Samba] samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
On Thursday, January 10, 2019 2:08 PM, Billy Bob via samba <samba at lists.samba.org> wrote:>Do you want to change your scripts to match my scripts as found on the >wiki ? >I know they work, well they have for me for the last 6 years.I am dropping an unedited version in now. I really should have done that before asking you to look at it.
Rowland Penny
2019-Jan-10 20:32 UTC
[Samba] samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
On Thu, 10 Jan 2019 20:18:37 +0000 (UTC) Billy Bob <billysbobs at yahoo.com> wrote:> > > On Thursday, January 10, 2019 2:08 PM, Billy Bob via samba > <samba at lists.samba.org> wrote: > >Do you want to change your scripts to match my scripts as found on > >the wiki ? > >I know they work, well they have for me for the last 6 years. > > > I am dropping an unedited version in now. I really should have done > that before asking you to look at it.I cannot offer support for something that is known to work, if it is heavily edited. This doesn't mean I am not open to suggestions on how to make things better, but the changes must come from a working system based on what is known to work. Rowland
Rowland Penny
2019-Jan-10 20:44 UTC
[Samba] samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
On Thu, 10 Jan 2019 20:07:40 +0000 (UTC) Billy Bob <billysbobs at yahoo.com> wrote:> > > On Thursday, January 10, 2019 1:43 PM, Rowland Penny via samba > <samba at lists.samba.org> wrote: > > >On Thu, 10 Jan 2019 19:09:01 +0000 (UTC) > >Billy Bob via samba <samba at lists.samba.org> wrote: > > > > > >> > >> As to the current issue, I am attemting to configure DHCP to update > >> DNS records with BIND9, as outlined in the Samba Wiki (with > >> correction of a couple errors in the "on release" and "on expiry" > >> sections of the example dhcpd.conf file). > > > >What errors ? > > In "on expiry" changed: > > execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, "", "0"); > > to > execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, "0", ""); > > and in on release (this one not really an error) gave > > execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, > ClientDHCID); > > a default null value for ClientName, as follows > > execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, > ClientDHCID, "");They have worked that way for me for a long time, can you remind me what OS you are using, it may be I need to add another note to the wiki page.> > > >Do you want to change your scripts to match my scripts as found on > >the wiki ? > >I know they work, well they have for me for the last 6 years. > > > I am not opposed to starting over with it. "My" script is just a copy > of the Wiki script with variables populated according to the values > for the server. Perhaps those values are not the same, test > conditions are different ... I don't know. It did work on prior > incarnation of DC. Also the logs looked much more like those below, > and the updates were being made. >Your script looks very different from mine and there is no mention of 'samba_dlz' in the log fragment you posted. I don't know what is doing the updates, but it doesn't seem to be the script, I take it you made it executable ? Rowland
Billy Bob
2019-Jan-10 21:28 UTC
[Samba] samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
Show original message On Thursday, January 10, 2019 2:45 PM, Rowland Penny via samba <samba at lists.samba.org> wrote: On Thu, 10 Jan 2019 20:07:40 +0000 (UTC) Billy Bob <billysbobs at yahoo.com> wrote:>> >> >> On Thursday, January 10, 2019 1:43 PM, Rowland Penny via samba >> <samba at lists.samba.org> wrote: >> >> >On Thu, 10 Jan 2019 19:09:01 +0000 (UTC) >> >Billy Bob via samba <samba at lists.samba.org> wrote: >> > >> > >> >> >> >> As to the current issue, I am attemting to configure DHCP to update >> >> DNS records with BIND9, as outlined in the Samba Wiki (with >> >> correction of a couple errors in the "on release" and "on expiry" >> >> sections of the example dhcpd.conf file). >> > >> >What errors ? >> >> In "on expiry" changed: >> >> execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, "", "0"); >> >> to >> execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, "0", ""); >> >> and in on release (this one not really an error) gave >> >> execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, >> ClientDHCID); >> >> a default null value for ClientName, as follows >> >> execute("/usr/local/bin/dhcp-dyndns.sh", "delete", ClientIP, >> ClientDHCID, ""); > >They have worked that way for me for a long time, can you remind me >what OS you are using, it may be I need to add another note to the wiki >page. >OS is Ubuntu 18.04 The only part that I think is an actual error is in the "on expiry" section. The Wiki shows "" for the ClientDHCID argument and "0" for the ClientName argument. I think having a null value for ClientIP will cause the script to exit at line 95, yes? As to the "on release" the change was to just make sure that a wrong value did not find its way in as ClientName. By forcing it null, the script gets the chance to always provide the correct name as part of the "delete" action exception of lines 98-106.> >Your script looks very different from mine and there is no mention of >'samba_dlz' in the log fragment you posted. I don't know what is doing >the updates, but it doesn't seem to be the script, I take it you made it >executable ?yessir, but running again with correct PATH lines. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Maybe Matching Threads
- samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
- samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
- samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
- samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates
- samba_dnsupdate options: --use-samba-tool vs. --use-nsupdate, and dhcpd dynamic updates