[Samba] dbcheck gets uncaught exception

Heiko Robert heiko.samba.info at ecm4u.de
Wed Jul 17 20:46:53 UTC 2024


> Anything after the 'Join failed' can be ignored, it is just an
> artefact of the cleanup.
> 
> I posted this:
> 
> Do not remove the existing database, well not unless you want to
> recreate your domain.
> 
> I will amend it:
> 
> Do not touch 'DC=DOMAINDNSZONES,DC=COMPANY,DC=INTRA.ldb' (or any of the
> other files in the same directory) directly, do all changes through
> sam.ldb, otherwise you have a very good risk of further damaging your
> database.
> 
> Rowland

Hey Rowland,

thanks for your feedback.
I did this on a cloned system. Original system is still untouched but I 
have no idea how to work around the initial issue not beeing able to do 
a dbcheck or join since something fundamental seams to be broken for 
this toolchain.

The reason I touched the files in the private dir was that even the 
offline backup failed on this database. I'm afraid I have to recreate 
the domain from scratch unless you have a better idea?

sudo samba-tool dbcheck --cross-ncs -d 5 --fix

Checking 3637 objects
ndr_pull_dom_sid: ndr_pull_error(Range Error): value out of range at 
../../librpc/ndr/ndr_sec_helper.c:329
ERROR(ldb): uncaught exception - ldb_wait from (null) with LDB_WAIT_ALL: 
Operations error (1)
   File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 
186, in _run
     return self.run(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/samba/netcmd/dbcheck.py", line 
169, in run
     error_count = chk.check_database(DN=DN, scope=search_scope,
   File "/usr/lib/python3/dist-packages/samba/dbchecker.py", line 255, 
in check_database
     error_count += self.check_object(object.dn, requested_attrs=attrs)
   File "/usr/lib/python3/dist-packages/samba/dbchecker.py", line 2310, 
in check_object
     res = self.samdb.search(base=dn, scope=ldb.SCOPE_BASE,

Thanks for your patience and help

Heiko


More information about the samba mailing list