Extending samba4 schema

Matthieu Patou mat at samba.org
Mon May 9 15:17:52 MDT 2011

Dear all,

Today at SAMBAXP 2011, I've been asked more than once can we extend 
samba4's schema to add our support for XXX.

I would say yes, but wasn't too much sure, so I searched in the list and 
found report from people having problems, I found this one quite intresting:


 From this schema update I extracted two files:

* zarafa.ldif
* zarafa_modify.ldif

I got this two files by splitting the adds and the modif in files 
accordingly as I'm not sure that ldbadd can handle both.

I corrected the ntdsSchemaAdd and ntdsSchemaModify to add and modify 
because we don't support MS extensions to ldif format (yet).

I also added the oMObjectClass:: KwwCh3McAIVK on object with a 
syntax. This is needed because we don't add dynamically this value if 
it's missing in the schema specification. I got the value for this class 
by doing an ldbsearch on existing objects in the schema with the same 
And with this I managed to import classes and attributes but also 
managed to keep my system running !

Other extensions should work correctly too, but we need an ldb module to 
validate and/or populate some well known attributes values when adding 
or modifying the schema. Basically it's checking that the change 
complies with what is written at source4/dsdb/schema/schema_syntax.c 2331

For users eager to have schema extension, a more simplier variation 
would be to write a python script that would load the ldif file into 
ldb_msgs objects (in python) and the for each ldb_msg object check if 
the synthax, the oMSyntax and other attributes are coherent. Although 
not perfect It would help to iron out some problems with schema.

By doing so I don't see so far any big objection to have rfc2307 and SFU 
schema able to be imported to samba, but I must confess I didn't had a 
deeper look on this schema.

Matthieu Patou
Samba Team        http://samba.org
Private repo      http://git.samba.org/?p=mat/samba.git;a=summary

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zarafa_modify.ldif
Type: text/x-ldif
Size: 1995 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110510/6fcc0359/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zarafa.ldif
Type: text/x-ldif
Size: 17462 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110510/6fcc0359/attachment-0001.bin>

More information about the samba-technical mailing list