Hans Hermann Meyer
2021-Feb-11 09:58 UTC
[Samba] How to delete DNS an entry with a special character?
Hello there, I inherited a Samba4 server and have a problem to delete a DNS entry containing a non printing character. To list all entries I used /bin/samba-tool dns query localhost mydomain.local @ ALL and found there are a few A entries where the name of the computer contains a non printing character, most likely a tabulator: Name= machine-01, Records=1, Children=0 A: 172.20.1.3 (flags=600000f0, serial=1227, ttl=900) (Note the gap between Name= and the machine name.) I suspect the might have happend when the entry was made using copy and paste. Unfortunately the normal command to delete the entry does not work: /bin/samba-tool dns delete localhost kniel.local machine-01 A 172.20.1.3 ERROR: Record does not exist Putting the computers' name in quotes (single or double doesn't matter) does not work, either: /bin/samba-tool dns delete localhost kniel.local "machine-01" A 172.20.1.3 ERROR: Record does not exist neither adding a blank before the computer name: /bin/samba-tool dns delete localhost kniel.local " machine-01" A 172.20.1.3 ERROR: Record does not exist To make things worse, the correct entry also exists: Name=machine-01, Records=1, Children=0 A: 172.20.1.3 (flags=f0, serial=1310, ttl=900) Any help to get a clean database is appreciated. Best regards, Hans