Hi Emmanuel, Thank you very much for your helps. It worked. I actually wrote a small python - which has a basic ldif support - script to transform OpenLdap LDIF export into like you described.
Have a nice week end. Cheers. Fabrice Le 13 avr. 2014 01:38, "Emmanuel Lécharny" <[email protected]> a écrit : > 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: ( 1.3.6.1.4.1.6054.3.125.2.56 NAME 'erADLastFailedLogin' > DESC 'Data of last failed login attempt.' SYNTAX > 1.3.6.1.4.1.1466.115.121.1. > 15 SINGLE-VALUE X-ORIGIN 'user defined' ) > > > becomes : > > attributetype ( 1.3.6.1.4.1.6054.3.125.2.56 NAME 'erADLastFailedLogin' > DESC 'Data of last failed login attempt.' SYNTAX > 1.3.6.1.4.1.1466.115.121.1.15 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. > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com > >
