[Samba] Error after upgrade NT_STATUS_INTERNAL_DB_CORRUPTION
Rowland penny
rpenny at samba.org
Wed Jul 24 16:05:28 UTC 2019
On 24/07/2019 16:01, Carlos via samba wrote:
> Hi
>
> samba-tool dbcheck
> ERROR(<class 'KeyError'>): uncaught exception - 'No such element'
> File
> "/opt/samba/lib/python3.6/site-packages/samba/netcmd/__init__.py",
> line 185, in _run
> return self.run(*args, **kwargs)
> File
> "/opt/samba/lib/python3.6/site-packages/samba/netcmd/dbcheck.py", line
> 141, in run
> check_expired_tombstones=selftest_check_expired_tombstones)
> File "/opt/samba/lib/python3.6/site-packages/samba/dbchecker.py",
> line 221, in __init__
> self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
I think this is a python 3 problem, the code around line 221 in
dbchecker is this:
res = samdb.search(base=ntds_service_dn,
scope=ldb.SCOPE_BASE,
expression="(objectClass=nTDSService)",
attrs=["tombstoneLifetime"])
if "tombstoneLifetime" in res[0]:
self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
else:
self.tombstoneLifetime = 180
It searches in AD to find the tombstone lifetime and it looks like the
search works, because the line that fails:
self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
is only run if 'tombstoneLifetime' is in the search result, so it seems
to be found, but then not found ????
Let me think about this to see if I can come up with a fix.
Rowland
More information about the samba
mailing list