[Samba] Problems on joining samba DC to a Windows Domain while adding DNS record for new DC

Mitja Tavčar mitja at mttv.it
Sat Aug 10 07:14:58 UTC 2024


Il giorno sab, 10/08/2024 alle 10.44 +1200, Douglas Bagnall ha scritto:
> 
> 
> > 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
> 
> 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:
> 

OK, I applied the sugested patch changes and the real error popped up: uncaught exception - (9601, 'WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST').

So this should a missing zone in my DNS. 



(...)
INFO 2024-08-10 09:06:07,195 pid:4847 /usr/lib/python3/dist-packages/samba/join.py #1180: Adding 1 remote DNS records for
LVSRVDC.intra.comune.trento.it
Using binding ncacn_ip_tcp:vmw2srvdc2.intra.comune.trento.it[,sign]
resolve_lmhosts: Attempting lmhosts lookup for name vmw2srvdc2.intra.comune.trento.it<0x20>
resolve_lmhosts: Attempting lmhosts lookup for name vmw2srvdc2.intra.comune.trento.it<0x20>
ldb_wrap open of secrets.ldb
Could not find machine account in secrets database: Failed to fetch machine account password for INTRA from both secrets.ldb (Could not find entry to
match filter: '(&(flatname=INTRA)(objectclass=primaryDomain))' base: 'cn=Primary Domains': No such object: dsdb_search at
source4/dsdb/common/util.c:5539) and from /var/lib/samba/private/secrets.tdb: NT_STATUS_CANT_ACCESS_DOMAIN_INFO
ERROR(runtime): uncaught exception - (9601, 'WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST')  
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 285, in _run
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
(...)






More information about the samba mailing list