directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: Import custom schema from OpenLDAP
Date Sat, 12 Apr 2014 23:37:34 GMT
Le 4/11/14 3:01 PM, Fabrice Aupert a écrit :
> Hi Emmanuel,
> Thanks for your answer.
>> You should *urgently* switch to 2.4.
> I was wrong actually. We're using OpenLdap 2.4.
>> Can you provide the exported LDIF ?
> See attached file. It contains quite a lot of attribute types and object
> classes from a Sun LDAP server which our client uses. As we can't have this
> proprietary LDAP serve in our infrastructure, I made a first import into an
> OpenLDAP server. Now we have to migrate to ApacheDS - for depressing
> reasons I'd rather not explain here .

This file does contains what is in the subschema subentry of your
OpenLDAP server. That's fine, but that's not something Studio will be
able to load as is.

You need to make it a standard openldap schema file (ie, if you store
this file in the schema subdirectory of any OpenLDAP server, and ask
OpenLDAP to load it, it will fail).

However, this is not exactly tough to transform this file so that it can
be loaded :
- remove the dn, and other things at the very beginning of the file, up
to the first attributeTypes attributeType.
- replace *all* the 'attributTypes:' to become 'attributetype' (beware :
this is case sensitive)
- do the same thing for 'objectClasses:' to be replaced with 'objectclass'
- now, you will have to go through all the elements, and merge the lines
so that each AT and OC are on one single line. An exemple :

attributeTypes: ( NAME 'erADLastFailedLogin'
  DESC 'Data of last failed login attempt.' SYNTAX
 15 SINGLE-VALUE X-ORIGIN 'user defined' )

becomes :

attributetype ( NAME 'erADLastFailedLogin'
DESC 'Data of last failed login attempt.' SYNTAX SINGLE-VALUE X-ORIGIN 'user defined' )

You will then be able to load the resulting file as an OpenLDAP schema.

Ye,s the last step is a bit painful, but it does the trick. You just
have to be careful not to leave extra spaces in the middle of elements
liks syntax or any other keyword.

I did it for a few elements, it worked.

Hoep it helps.

Emmanuel Lécharny 

View raw message