[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: schema discovery cookbook for OpenLDAP 2.1.x?



Hi,

Am Sonntag, 27. April 2003 15:14 schrieb Andrew H. Derbyshire:
> I created  RFC2252 schema data to extended the layout for OpenlDAP 2.1.16. 
> It's downright pretty, has properly assigned IANA OID, and even works.  :-)
>
> However, no one told me that the final customer target platform is the Sun
> directory server, and it only accepts LDIF schema data.
>
> What's a good cookbook to export my schema data loaded into a 2.1.16
> OpenLDAP server as LDIF?  I've seen the fossilized archive posts about
> getting to the cn=subschema entry, but lack of detail or internal brain
> damage prevents me from going further.

If you export the OpenLDAP sdchema into an LDIF file you have to filter out 
the entries that do not belong to your schema.

It is much easier to change your schema file into an LDIF:
1) bring each entry onto one line
2) remove the empty lines between the entries
3) Replace the first word of each entry:
   s/^attributetype/attributetypes:/i  and s/^objectclass/objectclasses:/i
4) Insert the 4 lines
	
	   dn: IPLANET-SCHEMA-DN
	   changetype: modify
	   add: attributetypes
   (including the empty first line ;-) before the list of lines starting with
   "attributetypes:". Do not leave an empty line between these four lines
   and the first line starting with "attributetypes:"
   Of course the string IPLANET-SCHEMA-DN has to be replaced by 
   the DN of the iPlanet schema (maybe cn=schema as in OpenLDAP)
   Do the equivalent with objectclasses
5) Insert the line
	version: 1
   at the top of the file
6) ldapmodify the result to the iPlanet server
   
Peter
-- 
Peter Marschall
eMail: peter@adpm.de