[Samba] How to fix --cross-ncs errors

Achim Gottinger achim at ag-web.biz
Thu Oct 23 07:18:03 MDT 2014


You need the GUID's for alle the objects causing errors and delete them 
manual.
In your exmaple below the DC is 
DC=HP57\0ACNF:180d6b3b-55b5-46e1-9a91-94870a250438 and the part after 
the ":" is the GUID for that object.

I used the command with samba stopped but it should work while running. 
Best make an backup from samba before you start trying.

Am 23.10.2014 14:57, schrieb James:
> Achim,
>
>     Thanks for the syntax. Should Samba be stopped before removing 
> entries from sam.lbd? After --cross-ncs --fix finishes I get the 
> following.
>
> Checked 114889 objects (28 errors)
>
> Any way to review these 28 errors that would not automatically fix 
> with 'samba-tool dbcheck -v --cross-ncs --fix'? Are these errors 
> logged somewhere? Maybe if I increase the log level for Samba and grep 
> them out?
>
>
> On 10/23/2014 8:32 AM, Achim Gottinger wrote:
>> Hi James,
>>
>> You may try to delete this entry with this syntax
>>
>> ldbdel -H /var/lib/samba/private/sam.ldb 
>> "<GUID=180d6b3b-55b5-46e1-9a91-94870a250438>"
>>
>> It's an Deleted Object causing the error, so not used at the moment.
>>
>> Had an similar issue few weeks back and fixed the cross-ncs errors by 
>> removing the objects on all my dc's afterwards dbcheck's passed clean.
>>
>> achim~
>>
>> Am 23.10.2014 14:17, schrieb James:
>>> Hi Daniel,
>>>
>>>     Upgraded from 4.11. to 4.13 last night. After running the 
>>> --cross-ncs --fix I receive several of the following errors.
>>>
>>> ERROR: wrong 
>>> dn[DC=HP57\0ACNF:180d6b3b-55b5-46e1-9a91-94870a250438,CN=Deleted 
>>> Objects,DC=DomainDnsZones,DC=mydomain,DC=local] 
>>> name='HP57\nDEL:180d6b3b-55b5-46e1-9a91-94870a250438' 
>>> new_dn[DC=HP57\0ADEL:180d6b3b-55b5-46e1-9a91-94870a250438,CN=Deleted 
>>> Objects,DC=DomainDnsZones,DC=mydomain,DC=local]
>>> Rename DC=HP57\0ACNF:180d6b3b-55b5-46e1-9a91-94870a250438,CN=Deleted 
>>> Objects,DC=DomainDnsZones,DC=mydomain,DC=local to 
>>> DC=HP57\0ADEL:180d6b3b-55b5-46e1-9a91-94870a250438,CN=Deleted 
>>> Objects,DC=DomainDnsZones,DC=mydomain,DC=local? [y/N/all/none]
>>>
>>> Failed to rename object 
>>> DC=HP57\0ACNF:180d6b3b-55b5-46e1-9a91-94870a250438,CN=Deleted 
>>> Objects,DC=DomainDnsZones,DC=mydomain,DC=local into 
>>> DC=HP57\0ADEL:180d6b3b-55b5-46e1-9a91-94870a250438,CN=Deleted 
>>> Objects,DC=DomainDnsZones,DC=mydomain,DC=local : (64, 'objectclass: 
>>> structural objectClass dnsNode is not a valid child class for 
>>> CN=Deleted Objects,DC=DomainDnsZones,DC=mydomain,DC=local')
>>>
>>>
>>>
>>>
>>> On 10/22/2014 12:37 PM, Daniel Fenert wrote:
>>>> W dniu 2014-10-22 o 18:10, James pisze:
>>>>> Hello,
>>>>>
>>>>>      Running #'samba-tool dbcheck --cross-ncs --fix' gives me a 
>>>>> handful
>>>>> of errors that are unable to fix automatically.  Samba attempts to
>>>>> rename entries but fails. Is there a way to quickly veiw the failed
>>>>> results without running this command again? Can these errors be fixed
>>>>> manually? Thanks.
>>>>>
>>>> Problem after upgrade?
>>>>
>>>> Look at my post from few days ago:
>>>> https://lists.samba.org/archive/samba/2014-October/185984.html
>>>>
>>>> ps. You should write at least version of your samba and what errors 
>>>> you
>>>> get :)
>>>>
>>>
>>
>



More information about the samba mailing list