Hello,
I have a little problem with the dhcp update script for the bind backend.
The problem seems to be with ISC dhcp itself,
but I hope someone can help me because the script from the samba wiki
offers this option.
The problem is, the script or the dhcp server doesn't use the option
hostname variable I define for every host.
It only uses the hostname which is offered by the client or the self-made
"noname" variable.
thanks in advance
Sacha
the link to the wiki page:
https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records_with_BIND9
corresponding host definitions from dhcpd.conf for syslog
# Wohnzimmer-Echo
host Wohnzimmer-Echo {
hardware ethernet aa:bb:cc:dd:ee:ff ;
fixed-address 192.168.7.5;
option host-name "Wohnzimmer-Echo";
}
# Marco-PC-LAN
host Marco-PC-LAN {
hardware ethernet 00:11:22:33:44:55 ;
fixed-address 192.168.16.30;
option host-name "Marco-PC";
}
The exception error in the Syslog does not affect, the clients are added.
Syslog:
Jan 11 22:39:38 routerpi dhcpd[83975]: Commit: IP: 192.168.7.5 DHCID:
aa:bb:cc:dd:ee:ff Name: dhcp-192-168-7-5
Jan 11 22:39:38 routerpi dhcpd[83975]: execute_statement argv[0]
/usr/local/bin/dhcp-dyndns.sh
Jan 11 22:39:38 routerpi dhcpd[83975]: execute_statement argv[1] = add
Jan 11 22:39:38 routerpi dhcpd[83975]: execute_statement argv[2] 192.168.7.5
Jan 11 22:39:38 routerpi dhcpd[83975]: execute_statement argv[3]
aa:bb:cc:dd:ee:ff
Jan 11 22:39:38 routerpi dhcpd[83975]: execute_statement argv[4]
dhcp-192-168-7-5
Jan 11 22:39:38 routerpi dhcpd: not updating DNS record in AD, invalid name
Jan 11 22:39:38 routerpi dhcpd[83975]: DHCPREQUEST for 192.168.7.5 from
aa:bb:cc:dd:ee:ff via vlan7
Jan 11 22:39:38 routerpi dhcpd[83975]: DHCPACK on 192.168.7.5 to
aa:bb:cc:dd:ee:ff via vlan7
Jan 11 22:39:42 routerpi dhcpd[83975]: Commit: IP: 192.168.16.30 DHCID:
00:11:22:33:44:55 Name: DESKTOP-38R1OBB
Jan 11 22:39:42 routerpi dhcpd[83975]: execute_statement argv[0]
/usr/local/bin/dhcp-dyndns.sh
Jan 11 22:39:42 routerpi dhcpd[83975]: execute_statement argv[1] = add
Jan 11 22:39:42 routerpi dhcpd[83975]: execute_statement argv[2] 192.168.16.30
Jan 11 22:39:42 routerpi dhcpd[83975]: execute_statement argv[3]
00:11:22:33:44:55
Jan 11 22:39:42 routerpi dhcpd[83975]: execute_statement argv[4] DESKTOP-38R1OBB
Jan 11 22:39:42 routerpi sh[89367]: ERROR(runtime): uncaught exception -
(9711, 'WERR_DNS_ERROR_RECORD_ALREADY_EXISTS')
Jan 11 22:39:42 routerpi sh[89367]: File
"/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186,
in _run
Jan 11 22:39:42 routerpi sh[89367]: return self.run(*args, **kwargs)
Jan 11 22:39:42 routerpi sh[89367]: File
"/usr/lib/python3/dist-packages/samba/netcmd/dns.py", line 945, in run
Jan 11 22:39:42 routerpi sh[89367]: raise e
Jan 11 22:39:42 routerpi sh[89367]: File
"/usr/lib/python3/dist-packages/samba/netcmd/dns.py", line 940, in run
Jan 11 22:39:42 routerpi sh[89367]:
dns_conn.DnssrvUpdateRecord2(dnsserver.DNS_CLIENT_VERSION_LONGHORN,
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.12
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.9
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.5
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.3
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.11
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.8
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.1
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.4
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.10
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 192.168.16
Jan 11 22:39:43 routerpi sh[89347]: 30
Jan 11 22:39:44 routerpi sh[89533]: Record deleted successfully
Jan 11 22:39:45 routerpi sh[89538]: Record added successfully
Jan 11 22:39:45 routerpi dhcpd: DHCP-DNS Update failed: 0:255:0:0
Jan 11 22:39:45 routerpi dhcpd[83975]: execute:
/usr/local/bin/dhcp-dyndns.sh exit status 256
Jan 11 22:39:45 routerpi dhcpd[83975]: DHCPREQUEST for 192.168.16.30 from
00:11:22:33:44:55 via vlan16
Jan 11 22:39:45 routerpi dhcpd[83975]: DHCPACK on 192.168.16.30 to
00:11:22:33:44:55 via vlan16