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

Denis Morejon denis.morejon at etecsa.cu
Tue Jul 31 15:04:37 UTC 2018



El 31/07/18 a las 07:35, Rowland Penny via samba escribió:
> 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

Ok. When renaming DC1 could it keep its IP address?  All my clients have 
fixed IP configuration (No DHCP) and they are configured to IP1: DNS1 
(DC1) and IP2: DNS2 (DC2). So I need to keep the IP of DC1. Is It a 
problem ?

Another question:
When you said clean out samba records, what files should I delete?
(/usr/local/samba/private/sam.ldb.d/*   ?)
>



More information about the samba mailing list