[Samba] "Fix DNS dynamic updates in Samba versions prior 4.0.7" [SOLVED]

Adam Tauno Williams awilliam at whitemice.org
Thu Apr 16 04:35:18 MDT 2015


On Thu, 2015-04-16 at 01:06 +0300, Andrey Repin wrote:
> Greetings, Adam Tauno Williams!
> >   Fix DNS dynamic updates in Samba versions prior 4.0.7
> > <https://wiki.samba.org/index.php/Fix_DNS_dynamic_updates_in_Samba_versions_prior_4.0.7>
> >   Trying to clean up a Samba domain that has existed forever.  And this
> >   issue seems to apply.  However the instructions are to run:
> >   # samba-tool dns add SERVER DOMAIN WORKSTATION A IP -k yes
> >   # samba-tool dns delete SERVER DOMAIN WORKSTATION A IP -k yes
> >   ... but what is the IP?
> IP is the machine address.
> If you didn't notice, you are adding AND deleting the same system in a short
> order, so IP doesn't really matters. It could be 127.0.0.2 for all that I
> know.
> You have to specify address. Any address.

That was one of my guesses; but I was not feeling adventurous [domains
dating from the 4.0.0/4.0.1 days have some interesting characteristics].

All the records are cleaned up now, thanks.

$ samba-tool dns query --username=administrator --password=****** \
    larkin26 EXAMPLE.COM @ ALL  > dynamicDNSRecordsToFix.txt
$ cat dynamicDNSRecordsToFix.txt | grep "Records=0, Children=0" | \
    cut -f2 -d"=" | cut -f 1 -d"," | \
    grep -v msdcs > hosts_to_add_and_delete
$ for WORKSTATION in `cat hosts_to_add_and_delete`
 do
   samba-tool dns add --username=adminsitrator --password=******* \
     LARKIN26 EXAMPLE.COM $WORKSTATION A 127.0.0.3 -k yes
   samba-tool dns delete --username=adminsitrator --password=******* \
     LARKIN26 EXAMPLE.COM $WORKSTATION A 127.0.0.3 -k yes
 done
Record added successfully
Record deleted succefully
Record added successfully
Record deleted succefully
Record added successfully
Record deleted succefully
...

-- 
Adam Tauno Williams <mailto:awilliam at whitemice.org> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA



More information about the samba mailing list