[Samba] Configure DHCP to update DNS records with BIND9

Rowland Penny rpenny at samba.org
Sat Jul 15 11:49:07 UTC 2017

OK, can you try the attached script, this will replace the
dhcp-dyndns.sh script you have now, you will also need to ensure it is

You will also need to alter your dhcpd.conf file, find this:

on expiry {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
# cannot get a ClientMac here, apparently this only works when actually receiving a packet
log(concat("Expired: IP: ", ClientIP));
# cannot get a ClientName here, for some reason that always fails
execute("/etc/dhcp/bin/dhcp-dyndns.sh", "delete", ClientIP, "", "0");

Change the last line to this:

execute("/etc/dhcp/bin/dhcp-dyndns.sh", "delete", ClientIP);

Restart dhcpd and you should now find it works (famous last words :-) )


More information about the samba mailing list