Changing DNS domain/SOA values with samba-tool? [How?!]

Amitay Isaacs amitay at gmail.com
Thu Jan 5 17:02:59 MST 2012


Hi Adam,

On Fri, Jan 6, 2012 at 6:18 AM, Adam Tauno Williams
<awilliam at whitemice.org> wrote:
> On Fri, 2011-12-23 at 09:28 +1100, Amitay Isaacs wrote:
>> > But what is the value for <name> in "samba-tool dns update 127.0.0.1
>> > micore.us <name> A 192.168.231.132 192.168.5.2" in order to modify that
>> > entry.  I've tried "", ".", "@"....  none of which map to a record in
>> > the LDB, thus yielding -
>> > ERROR(runtime): uncaught exception - (9701,
>> > 'WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST')
>> The root of the zone is identified by the zone name itself.
>> samba-tool dns update 127.0.0.1 micore.us micore.us A <oldip> <newip
>> That should do the trick.
>
> Should, yes. But it doesn't.  That was the first syntax I 'guessed'.  It
> does not work.
>
> barbel:~ # samba-tool dns update 127.0.0.1 micore.us micore.us A
> 192.168.231.132 192.168.5.2
> Password for [administrator at MICORE.US]:
> ERROR(runtime): uncaught exception - (9701,
> 'WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST')
>  File "/opt/s4/lib64/python2.7/site-packages/samba/netcmd/__init__.py",
> line 167, in _run
>    return self.run(*args, **kwargs)
>  File "/opt/s4/lib64/python2.7/site-packages/samba/netcmd/dns.py", line
> 814, in run
>    del_rec_buf)
>
> I believe this value does not really exist in the micore.us / SOA record
> but in some kind of 'unnamed' record.  It is wierd.
>
> barbel:~ # /opt/s4/bin/samba-tool dns query 127.0.0.1 micore.us @ ALL
> Password for [administrator at MICORE.US]:
>  Name=, Records=3, Children=0
>    SOA: serial=12, refresh=900, retry=600, expire=86400,
> ns=barbel.micore.us., email=hostmaster.micore.us. (flags=600000f0,
> serial=12, ttl=3600)
>    NS: barbel.micore.us. (flags=600000f0, serial=1, ttl=900)
>    A: 192.168.231.132 (flags=600000f0, serial=1, ttl=900)
>  Name=_msdcs, Records=0, Children=0
>  Name=_sites, Records=0, Children=1
>  Name=_tcp, Records=0, Children=4
>  Name=_udp, Records=0, Children=2
>  Name=barbel, Records=1, Children=0
>    A: 192.168.5.2 (flags=f0, serial=3, ttl=900)
>  Name=DomainDnsZones, Records=0, Children=2
>  Name=ForestDnsZones, Records=0, Children=2

The IP address for the domain is actually set in '@' record, which you
have been using
to query the zone.

There was a problem in the code when updating the DNS record with '@'
or domain name.
I have now fixed it and it should be in master by the end of the day.

Amitay.


More information about the samba-technical mailing list