[Samba] samba-tool dbcheck "Indexed and full searches both failed"

Rowland Penny rpenny at samba.org
Tue Jul 31 12:35:46 UTC 2018


On Tue, 31 Jul 2018 07:37:38 -0500
Denis Morejon via samba <samba at lists.samba.org> wrote:

> Hi:
> 
> I have two samba 4.7.4 DCs. One of them has problems. I can not use 
> samba-tool on it. Then, when I try to fix It's database It returns:
> 
> -------------------------------------------------------------------------------------------------------------------
> root at zentyal1:/usr/lib/cgi-bin/account_operator# samba-tool dbcheck
> --fix
> 
> ltdb: 
> tdb(/usr/local/samba/private/sam.ldb.d/DC=DTCF,DC=ETECSA,DC=CU.ldb): 
> tdb_rec_read bad magic 0x434e5355 at offset=35404552
> 
> ERROR(ldb): uncaught exception - Indexed and full searches both
> failed!
> 
> ----------------------------------------------------------------------------------------------------------------------
> 
> root at zentyal1:/usr/lib/cgi-bin/account_operator# samba-tool dbcheck 
> --fix --cross-ncs
> 
> ltdb: 
> tdb(/usr/local/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=DTCF,DC=ETECSA,DC=CU.ldb): 
> tdb_rec_read bad magic 0xd9fee666 at offset=3187652
> 
> ERROR(ldb): uncaught exception - Indexed and full searches both
> failed!
> -----------------------------------------------------------------------------------------------------------------------
> 
> When I try this in the second DC It returns no error.
> 
> Can I copy these files (/usr/local/samba/private/sam.ldb.d/*) from
> the second DC to the first one to solve the corruption ? Should these
> files be equals ?

NO and NO

Whilst most of sam.ldb is the same on each DC, there are differences,
some attributes are not replicated between DC's

If one of your DC's is running okay, I would demote the faulty one
(transferring or seizing any FSMO roles to the good DC). At this point,
you can rename the faulty DC, clean out any Samba records and then
rejoin it is another DC.

Rowland



More information about the samba mailing list