Help wanted - simple python or perl script for schema conversion

Andrew Bartlett abartlet at
Tue Dec 16 06:38:40 GMT 2008

On Tue, 2008-12-16 at 01:47 +0530, Sreepathi Pai wrote:
> On Mon, Dec 15, 2008 at 2:35 PM, Sreepathi Pai <sree314 at> wrote:
> > On Mon, Dec 15, 2008 at 1:05 PM, Andrew Bartlett <abartlet at> wrote:
> >
> >> Oddly, I also have a weird issue to report - even with your script as
> >> is, the provision fails.  I ran it like:
> >>
> >> python ../../scripting/bin/minschema_wspp
> >> MS-AD_Schema_Attributes_v20080618.txt MS-AD_Schema_Classes_v20080618.txt
> >> --dump-classes --dump-attributes > ../schema.ldif
> >
> > I haven't tested it with 'make test', but the above command would not
> > generate the Aggregate entry. Is this what you want? Can you try
> > without any options? I'll try to check it too.
> Attached patch fixes a couple of issues with the script:
> Manually add relevant objectClass attribute to attributes
> (attributeSchema) and classes (classSchema) to the output.
> (The ADA/ADSC docs do not contain this attribute).
> Translate oMObjectClass attribute contents to binary octet string.
> Fix bug when reading multivalued attributes from a LDIF file.
> It still does not provision, however, now I'm seeing this error during
> make test:
> dsdb/schema/schema_init.c:697: 'gecos': unable to map attributeID
> Traceback (most recent call last):
>   File "./setup/provision", line 183, in <module>
>     ldap_backend_type=opts.ldap_backend_type)
>   File "bin/python/samba/", line 1025, in provision
>     ldap_backend_type=ldap_backend_type)
>   File "bin/python/samba/", line 758, in setup_samdb
>     names.hostname)
>   File "bin/python/samba/", line 1544, in load_schema
>     samdb.attach_schema_from_ldif(head_data, schema_data)
>   File "bin/python/samba/", line 188, in attach_schema_from_ldif
>     misc.dsdb_attach_schema_from_ldif_file(self, pf, df)
> RuntimeError: (8596, 'WERR_DS_NO_MSDS_INTID')
> Unfortunately, I'm not familiar with prefixMap.txt contents. MS-ADA3
> describes the attribute as "internal use only".

Yep - this is a mapping table from the OIDs used in public schema to the
numeric values used particularly in DRSUAPI.

Just add a line and value for for now (and repeat for the
next missing prefix)

> FWIW, 'gecos' is a new attribute in the generated schema.ldif.

metze:  Can we automatically extend the map for these attributes (as we
do for later adds)?  Or must we discover the full table Microsoft uses,
so we don't get conflicts in the early stages of the DRS replication?

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 
Samba Developer, Red Hat Inc.        

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url :

More information about the samba-technical mailing list