[Samba] dbcheck gets uncaught exception

Heiko Robert heiko.samba.info at ecm4u.de
Thu Jul 18 09:37:30 UTC 2024


>> I'm not sure if the dup keys in the
>> 'DC=DOMAINDNSZONES,DC=COMPANY,DC=INTRA.ldb' is my root issue and why
>> the dbcheck fails with that uncaught exception. How would I fix such
>> a duplicate key in that file through sam.ldb?
> 
> sam.ldb is the gateway to the files in /var/lib/samba/private/sam.ldb.d
> , if you are going to change anything, do it through sam.ldb. You may
> find the ldbsearch '--cross-ncs' switch useful here.

That's what I already tried

ldbsearch --cross-ncs -H /var/lib/samba/private/sam.ldb dn|grep 
'INDEX\|USNCHANGED'

doesn't find anything so either I'm doing somtheing wrong on my query or 
these technical entries are not exposed to sam.ldb?

>> To identify the dup key I creted a tdbdump and then counted the keys:
>>
>> awk '$1 ~ /^key/ {print $3}' DOMAINDNSZONES.tdbdump |sort|uniq -c |
>> sort -nr | head
>>
>> the dupliate entry is
>>
>> {
>> key(42) = "DN=@INDEX:USNCHANGED:p0000000000000048557\00"
>> data(116) =
>> "h\19\01&\02\00\00\00&\00\00\00 at INDEX:USNCHANGED:p0000000000000048557\00\00\00\00\00\00)\00\00\00\0B\00\00\00 at IDXVERSION\00\01\00\00\00\01\01\04\00\00\00 at IDX\00\01\00\00\00\01\103\00$s$\BB\D6;UJ\B1|\F3\B5\90l6\A4\00"
>> }

>  From your error message, it appears that you are attempting to join
> another Samba 4.15.13 DC, can I suggest you try with Debian 12 with
> Samba from backports, this will get you the very latest Samba 4.20.2
> Perhaps this may help.

initially the issue had been identified while trying to join from a new, 
second samba-ad but for now I'm trying to get thru 'samba-tool dbcheck 
--cross-ncs' first

I will try on a debian 12 with 4.20.2 as suggested and report back.

Thanks!

Heiko


More information about the samba mailing list