[Samba] Failed to fetch machine account password for MYDOMAIN from both secrets.ldb

Luis Peromarta lperoma at icloud.com
Fri Jun 21 10:45:23 UTC 2024


While trying to join a DC to a old domain, I am getting this:

Replicated 91 objects (338 linked attributes) for DC=mydomain,DC=int
ldb_wrap open of secrets.ldb
Could not find machine account in secrets database: Failed to fetch machine account password for MYDOMAIN from both secrets.ldb (Could not find entry to match filter: '(&(flatname=MYDOMAIN)(objectclass=primaryDomain))' base: 'cn=Primary Domains': No such object: dsdb_search at ../source4/dsdb/common/util.c:4575) and from /var/lib/samba/private/secrets.tdb: NT_STATUS_CANT_ACCESS_DOMAIN_INFO
ERROR(runtime): uncaught exception - (8442, 'WERR_DS_DRA_INTERNAL_ERROR')
File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 176, in _run
 return self.run(*args, **kwargs)
 File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 652, in run
 machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
 File "/usr/lib/python2.7/dist-packages/samba/join.py", line 1253, in join_DC
 File "/usr/lib/python2.7/dist-packages/samba/join.py", line 1153, in do_join
 File "/usr/lib/python2.7/dist-packages/samba/join.py", line 907, in join_replicate
 File "/usr/lib/python2.7/dist-packages/samba/drs_utils.py", line 254, in replicate
 (level, ctr) = self.drs.DsGetNCChanges(self.drs_handle, req_level, req)
Adding CN=DEBIAN-9,OU=Domain Controllers,DC=mydomain,DC=int
Adding CN=DEBIAN-9,CN=Servers,CN=site1,CN=Sites,CN=Configuration,DC=mydomain,DC=int
Adding CN=NTDS Settings,CN=DEBIAN-9,CN=Servers,CN=site1,CN=Sites,CN=Configuration,DC=mydomain,DC=int
Adding SPNs to CN=DEBIAN-9,OU=Domain Controllers,DC=mydomain,DC=int
Setting account password for DEBIAN-9$
Enabling account
Calling bare provision
Provision OK for domain DN DC=aresbarcelona,DC=lan
Starting replication
Replicating critical objects from the base DN of the domain
Done with always replicated NC (base, config, schema)
Replicating DC=DomainDnsZones,DC=aresbarcelona,DC=lan
Join failed - cleaning up
Deleted CN=DEBIAN-9,OU=Domain Controllers,DC=mydomain,DC=int
Deleted CN=NTDS Settings,CN=DEBIAN-9,CN=Servers,CN=site1,CN=Sites,CN=Configuration,DC=mydomain,DC=int
Deleted CN=DEBIAN-9,CN=Servers,CN=site1,CN=Sites,CN=Configuration,DC=mydomain,DC=int

Would anyone have a clue of what this can mean ? Machine account for “MYDOMAIN” ? Is this why the join fails ?

I have seen this before


I am using internal DNS. Not sure if this is related.

I am about to give up and start from zero with a new domain. Too long looking at this,


More information about the samba mailing list