[Samba] Device ends up with multiple dns records and IP addresses

Sebastian Arcus s.arcus at open-t.co.uk
Thu Nov 11 14:59:33 UTC 2021


On 11/11/2021 14:06, Rowland Penny via samba wrote:
> On Thu, 2021-11-11 at 13:53 +0000, Sebastian Arcus via samba wrote:
>>>>>>
>>
>> Thank you for the suggestion. I've already tried 0.9.3 yesterday. It
>> does look like the code is a bit more robust - but the basic issue
>> still
>> exists. If somehow the dns back-end ends up with an A record with
>> multiple IP addresses, or a PTR record with multiple hostnames (or
>> both), the "samba-tool dns query" command returns multiple lines and
>> the
>> script is unable to delete the existing records - as it passes a
>> multi-line argument to "samba-tool dns delete ..." command - which
>> fails. So it just keeps on adding more IPs and/or hostnames to the
>> existing records anyway, without deleting existing ones.
>>
>> Would it be safer for the script to at least detect the presence of
>> multi IP / multi host records, and maybe abort trying to add the
>> IP/hostname to the DNS back-end - and exit with an error? Or simply
>> exit
>> if the "samba-tool dns delete ..." command returns an error? Or
>> maybe
>> delete one by one all the IP addresses for the respective A record,
>> and
>> all the hostnames for the PTR record - and then create the new A /
>> PTR
>> record?
> 
> Anything is possible, (well nearly anything), let me have look at this
> and see if I can come up with something.


Brilliant - much appreciated!




More information about the samba mailing list