[Samba] dhcp-dyndns.sh creates no PTR entry

Ingo Asche foren at asche-rz.de
Fri Nov 12 12:55:37 UTC 2021

The script gets exactly what you described in your first answer. An IPv6 
address is not shown in the syslog.

But I just did another testing. It's the format of the IPv6 zone name 
which breaks the function.

A simple "grep 'in-addr'" might do the trick if that's a correct way. If 
I add that to the seach command for the reverse zones only the IPv4 
zones will be shown and the script uses the correct zone even then there 
are more than one IPv4 reverse zones:
ReverseZones=$($SAMBATOOL dns zonelist ${Server} $KTYPE --reverse | grep 
'pszZoneName' | awk '{print $NF}' | grep 'in-addr')


Rowland Penny via samba schrieb am 12.11.2021 um 13:45:
> On Fri, 2021-11-12 at 13:22 +0100, Ingo Asche wrote:
>> Let's not start that discussion... :-)
>> I got similar lines in my syslog and also only IPv4, that's not the
>> problem.
> I need to see what dhcp is sending to the script, is it sending the
> data twice, or is it sending the IPv4 & IPv6 addresses on the same
> line, or something else ?
>> I think the problem begins in line 230 for example in your script:
>> ReverseZones=$($SAMBATOOL dns zonelist ${Server} $KTYPE --reverse |
>> grep
>> 'pszZoneName' | awk '{print $NF}')
> It might be, but until I see what the script gets, I cannot even begin
> to fix it. The problem is that the script is written around IPv4 and it
> will either need to dump the IPv6 address, or be rewritten to use IPv6.
> Rowland

More information about the samba mailing list