[Samba] Error after upgrade NT_STATUS_INTERNAL_DB_CORRUPTION
Carlos
carlos.hollow at gmail.com
Wed Jul 24 17:07:56 UTC 2019
Hi!
After change file
/opt/samba/lib/python3.6/site-packages/samba/dbchecker.py , dbcheck was ok
Output log:
checking 2407 objects
NOTE: old (due to rename or delete) DN string component for
lastKnownParent in object CN=RID
Set\0ADEL:4faaeabf-54f9-4997-a2cf-a27d034ba524,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br - CN=DC-SAMBA-09,OU=Domain
Controllers,DC=interno,DC=xxxxxxxx,DC=com,DC=br
Not fixing old string component
NOTE: old (due to rename or delete) DN string component for
lastKnownParent in object CN=RID
Set\0ADEL:cb3c6ef2-307c-4bdc-8a35-563f02e4b150,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br - CN=DC-SAMBA-09,OU=Domain
Controllers,DC=interno,DC=xxxxxxxx,DC=com,DC=br
Not fixing old string component
NOTE: old (due to rename or delete) DN string component for
lastKnownParent in object CN=RID
Set\0ADEL:65cb30fc-9f75-44b1-8544-6a48a717c92b,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br - CN=DC-SAMBA-09,OU=Domain
Controllers,DC=interno,DC=xxxxxxxx,DC=com,DC=br
Not fixing old string component
SKIPING: object
CN=Machine\0ADEL:1ac0b25b-c761-4dbb-a575-976f6b2452cc,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br is an expired tombstone
isDeleted: attid=0x00020030 version=1
invocation=e8c81fc7-2fdf-404a-804c-24fbade3ebde usn=2693314 (local=6398)
at Fri Jan 25 12:02:34 2019
SKIPING: object
CN=User\0ADEL:514f31a0-dd3d-4c58-8d78-b0c907714b98,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br is an expired tombstone
isDeleted: attid=0x00020030 version=1
invocation=e8c81fc7-2fdf-404a-804c-24fbade3ebde usn=2693315 (local=6399)
at Fri Jan 25 12:02:34 2019
NOTE: old (due to rename or delete) DN string component for
lastKnownParent in object CN=RID
Set\0ADEL:f7c426c5-c725-4a54-b73a-b6b6648b083b,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br - CN=DC-SAMBA-09,OU=Domain
Controllers,DC=interno,DC=xxxxxxxx,DC=com,DC=br
Not fixing old string component
NOTE: old (due to rename or delete) DN string component for
lastKnownParent in object CN=RID
Set\0ADEL:96b66221-ce27-41e4-a208-c9190a265fb6,CN=Deleted
Objects,DC=interno,DC=xxxxxxxx,DC=com,DC=br - CN=DC-SAMBA-09,OU=Domain
Controllers,DC=interno,DC=xxxxxxxx,DC=com,DC=br
Not fixing old string component
NOTICE: found 2 expired tombstones, 'samba' will remove them daily,
'samba-tool domain tombstones expunge' would do that immediately.
Checked 2407 objects (0 errors)
And executed
samba-tool dbcheck --cross-ncs --fix --yes
No erro.
but same erro in test....
smbclient //localhost/netlogon -UAdministrator -c 'ls'
Enter SERVERAD\Administrator's password:
session setup failed: NT_STATUS_INTERNAL_DB_CORRUPTION
Regards;
On 24/07/2019 13:31, Rowland penny via samba wrote:
> On 24/07/2019 17:05, Rowland penny via samba wrote:
>> 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
>>
>>
>>
> OK, when I actually checked a DC running 4.10.6, the code actually
> looks like this:
>
> res = samdb.search(base=ntds_service_dn,
> scope=ldb.SCOPE_BASE,
> expression="(objectClass=nTDSService)",
> attrs=["tombstoneLifetime"])
> self.tombstoneLifetime = int(res[0]["tombstoneLifetime"][0])
>
> but in 'master', it now looks like 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
>
> So, try opening 'dbchecker.py' in your favourite editor and make it
> look like the latter and try again.
>
> /usr/lib/python3/dist-packages/samba/dbchecker.py
>
> Starts at line 217
>
> Rowland
>
>
>
>
More information about the samba
mailing list