On Sun, 2023-08-27 at 09:23 +0800, Reese Wang via samba
wrote:> Hi,I'm following Samba AD schema extensions wiki page to
> addsshPublicKeys to schema, but ldbmodify returned the following
> error:
> # LDB_MODULES_PATH=/usr/lib64/samba/ldb/ ldbmodify
> -H/var/lib/samba/private/sam.ldb Sshpubkey.ldif.txt
> --option="dsdb:schema update allowed"=trueERR: (Constraint
violation)
> "000020B5: Referenced object not found
> at../../source4/dsdb/samdb/ldb_modules/extended_dn_store.c:357:extend
> ed_replace_callback"on DN CN=sshPublicKey,DC=ad,DC=example,DC=org at
> block before line 16Modify failed after processing 0 records
> What am I missing here? I'm using Samba 4.18.6 in Arch Linux docker
> container.My Sshpubkey.ldif.txt:dn:
> CN=sshPublicKey,DC=ad,DC=example,DC=org
Both this line
> changetype: addobjectClass: topobjectClass:
> attributeSchemaattributeID: 1.3.6.1.4.1.24552.500.1.1.1.13cn:
> sshPublicKeyname: sshPublicKeylDAPDisplayName:
> sshPublicKeydescription: MANDATORY: OpenSSH Public
> keyattributeSyntax: 2.5.5.10oMSyntax: 4isSingleValued:
> FALSEobjectCategory: CN=Attribute-Schema,DC=ad,DC=example,DC=org
And this line don't include the full schema DN, eg
cn=schema,cn=configuration,dc=ad,dc=example,dc=com
> searchFlags: 8schemaIDGUID:: cjDAZyEXzU+/akI0EGDW+g=
Andrew Bartlett
--
Andrew Bartlett (he/him) https://samba.org/~abartlet/Samba Team Member
(since 2001) https://samba.orgSamba Team Lead
https://catalyst.net.nz/services/sambaCatalyst.Net Ltd
Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group
company
Samba Development and Support: https://catalyst.net.nz/services/samba
Catalyst IT - Expert Open Source Solutions