[Samba] Problems on joining samba DC to a Windows Domain while adding DNS record for new DC
Douglas Bagnall
douglas.bagnall at catalyst.net.nz
Fri Aug 9 22:44:41 UTC 2024
On 10/08/24 03:51, Mitja Tavčar via samba wrote:
> So here is the final part of the log from the last run with 4.20.2 version
> I see no other errors along the log just some warning.
>
> Deleted CN=NTDS Settings,CN=LVSRVDC,CN=Servers,CN=PSN,CN=Sites,CN=Configuration,DC=intra,DC=comune,DC=trento,DC=it
> Deleted CN=LVSRVDC,CN=Servers,CN=PSN,CN=Sites,CN=Configuration,DC=intra,DC=comune,DC=trento,DC=it
> ERROR(<class 'UnboundLocalError'>): uncaught exception - cannot access local variable 'res' where it is not associated with a value
> File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 285, in _run
> return self.run(*args, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/samba/netcmd/domain/join.py", line 128, in run
> join_DC(logger=logger, server=server, creds=creds, lp=lp, domain=domain,
> File "/usr/lib/python3/dist-packages/samba/join.py", line 1621, in join_DC
> ctx.do_join()
> File "/usr/lib/python3/dist-packages/samba/join.py", line 1518, in do_join
> ctx.join_add_dns_records()
> File "/usr/lib/python3/dist-packages/samba/join.py", line 1215, in join_add_dns_records
> for rec in res.rec:
> ^^^
There is a bug here that is suppressing the real source of the problem.
If you can change that part of /usr/lib/python3/dist-packages/samba/join.py
to read:
except WERRORError as e:
if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST:
name_found = False
else:
print(e)
raise
if name_found:
(for example, by applying the attached patch), we might see what is
going wrong.
cheers,
Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-join-do-not-suppress-unexpected-DNS-enum-erro.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba/attachments/20240810/4033f785/0001-python-join-do-not-suppress-unexpected-DNS-enum-erro.bin>
More information about the samba
mailing list