Hello Andrew,
Thank you for your reply (very much appreciated).
> I take it you are trying to move from the flatfile based bind to internal.
That is correct
> The samba_upgradedns script is pretty simple, and uses the
> dnspython library to read zone files. It certainly could be
> the case that it just can't read the zone file after bind9
> has been doing dynamic updates on it.
> Perhaps get a newer dnspython lib on your system,
> and see if that helps.
I have installed the most recent version I could find at:
https://github.com/rthalley/dnspython
The script samba_upgradedns returns the following error:
Error parsing DNS data from '/opt/samba/private/dns/TH01.INET.zone' (The
DNS zone has no SOA RR at its origin.)
This could mean that I should add a Start of Authority Resource Record at
the top of the TH01.INET.zone file to make it work/acceptable? I am
considering to create a backup of this file and try again with a SOA RR.
I am only a little bit worried about the second exception.
Please note: I just did upgrade to Samba 4.4.3 (as I do want to change over
to Samba's internal DNS).
The returned error is:
Traceback (most recent call last):
File "./samba_upgradedns", line 317, in <module>
ncname = msg[0]['nCName'][0]
KeyError: 'No such element'
> In many ways you are lucky, as this script is a little too lax
> with the exception handling, and any error at all means it will
> just re-create the DNS data from scratch, without importing the data
> (please file a bug).
I will file a bug as soon as possible.
> The second exception (on ncName) is fixed in 4.4.
> Sorry,
> Andrew Bartlett
Does this mean that the script would end without issues when I add a SOA RR
to the zone file combined with a fix regarding to the second exception? Note:
I just did upgrade to Samba 4.4.3.
Please find my console output below.
root at comsrv01a:/opt/samba/sbin# service samba4 stop && service bind9
stop
samba4 stop/waiting
* Stopping domain name service... bind9
waiting for pid 3322 to die
[ OK ]
root at comsrv01a:/opt/samba/sbin# ./samba_upgradedns
--dns-backend=SAMBA_INTERNAL
lpcfg_load: refreshing parameters from /opt/samba/etc/smb.conf
Reading domain information
lpcfg_load: refreshing parameters from /opt/samba/etc/smb.conf
DNS accounts already exist
Reading records from zone file /opt/samba/private/dns/TH01.INET.zone
Error parsing DNS data from '/opt/samba/private/dns/TH01.INET.zone' (The
DNS zone has no SOA RR at its origin.)
DNS records will be automatically created
Traceback (most recent call last):
File "./samba_upgradedns", line 317, in <module>
ncname = msg[0]['nCName'][0]
KeyError: 'No such element'
root at comsrv01a:/opt/samba/sbin# service bind9 start && service samba4
start
* Starting domain name service... bind9
[ OK ]
samba4 start/running, process 7693
root at comsrv01a:/opt/samba/sbin# ./samba --version
Version 4.4.3
Many thanks for your help/reply.
Kind regards,
Bouke
--
This message (and any associated files) may contain confidential and/or
privileged information. If you are not the intended recipient or authorized
to receive this for the intended recipient, you must not use, copy,
disclose or take any action based on this message or any information
herein. If you have received this message in error, please advise the
sender immediately by sending a reply e-mail and delete this message. Thank
you for your cooperation.