[Samba] Error Upgrading Schema

Matthew Delfino Samba List mdelfino.list.samba at KNOCKinc.com
Fri Nov 20 15:46:55 UTC 2020


Rowland,

I had the same thought. When I do that and try again, I get this message:

 # 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 209 (offset -35 lines).\n'
 b'patch: **** unexpected end of file in patch\n'
 ERROR: Failed to upgrade schema

I feel like it's got to be some small syntax oversight on my part...

Thanks,
Matthew


On 2020.11.20, 3:00 AM, "samba on behalf of Rowland penny via samba" <samba-bounces at lists.samba.org on behalf of samba at lists.samba.org> wrote:

    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



    --
    To unsubscribe from this list go to the following URL and read the
    instructions:  https://lists.samba.org/mailman/options/samba

© 2020 KNOCK, inc. All rights reserved. KNOCK, inc, is a registered trademark of KNOCK, inc. This message and any attachments contain information, which is confidential and/or privileged. If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information. Please be aware that such actions are prohibited. If you have received this transmission in error, kindly notify the sender by e-mail. Your cooperation is appreciated.


More information about the samba mailing list