[Samba] Error Upgrading Schema

Rowland penny rpenny at samba.org
Fri Nov 20 09:00:00 UTC 2020


On 20/11/2020 02:13, Matthew Delfino Samba List wrote:
> Thank you, Andrew!
>
> This evening I attempted the upgrade. I first carefully commented out each of the attributes from the Schema-Updates.md file. I then saved the file and ran the following command, which gave me the subsequent output:
>
> (as root)
>
>    # samba-tool domain schemaupgrade
>    Temporarily overriding 'dsdb:schema update allowed' setting
>    Patched Sch49.ldf using /usr/share/samba/setup/adprep/WindowsServerDocs/Sch49.ldf.diff
>    Exception in patch: b'patching file Sch50.ldf\nHunk #2 succeeded at 207 (offset -37 lines).\nHunk #3 FAILED at 277.\n1 out of 3 hunks FAILED -- saving rejects to file Sch50.ldf.rej\n'
>    b''
>    ERROR: Failed to upgrade schema
>
> I had hoped there was a Sch50.ldf.rej in the working directory, or in the same folder wherein Schema-Updates.md makes its home. Unfortunately, there was nothing there. A find for any file by that name revealed nothing as well.
>
> I read this output to tell me that the schema upgrade went through Sch49.ldf.diff without issue, but ran into some kind of problem in Sch50.ldf.diff OR... there appears to be a section in Schema-Updates.md for Sch50.ldf: line 3120 " ### <a name="BKMK_Sch50"></a>Sch50.ldf" and something about the syntax below that line is going bad? Indeed, I do have some attributes in that section commented out:
>
>    CN=ms-DS-Primary-Computer,CN=Schema,CN=Configuration,DC=X
>    CN=ms-DS-Is-Primary-Computer-For,CN=Schema,CN=Configuration,DC=X
>    CN=ms-DS-Value-Type-Reference,CN=Schema,CN=Configuration,DC=X
>    CN=ms-DS-Value-Type-Reference-BL,CN=Schema,CN=Configuration,DC=X
>
> (The comment character I am using is a hash tag "#", by the way).
>
> And one of those attributes is described in the Sch50.ldf.diff file as well (CN=ms-DS-Value-Type-Reference-BL,CN=Schema,CN=Configuration,DC=X).
>
> Do you have any ideas as to what I may have done wrong or forgot?
>
> Thank you again for any time you can spare to assist me in upgrading my schema.
>
OK, I think I understand what is going on here, running the command 
'samba-tool domain schemaupgrade' uses 'Schema-Updates.md', but it also 
patches the ldifs created with the *.diff files and these contain 
attributes that you have removed from 'Schema-Updates.md'. This means 
that it is the patching that is failing, so try removing the already 
installed attributes from the *.diff files as well.

Rowland





More information about the samba mailing list