Installing custom ldap schema 6.0: Difference between revisions

(New page: When extending ZCS, it is sometimes desirable to add additional LDAP schema to the OpenLDAP server shipped with ZCS. Starting with the 6.0 release, the new config backend is used, which m...)
 
No edit summary
Line 1: Line 1:
When extending ZCS, it is sometimes desirable to add additional LDAP schema to the OpenLDAP server shipped with ZCS.  Starting with the 6.0 release, the new config backend is used, which means that the traditional *.schema files are no longer in play.
When extending ZCS, it is sometimes desirable to add additional LDAP schema to the OpenLDAP server shipped with ZCS.  Starting with the 6.0 release, the new config backend is used, which means that the traditional *.schema files are no longer in play. Instead, LDIF-based versions of the old schema files are used by the new config backend.  This means that traditional "schema" files need to be converted to the new LDIF format for ZCS to be able to use them.  Fortunately, a utility to do this conversion is shipped with the ZCS OpenLDAP build, and the conversion process is fairly trivial.  It consists of creating a temporary configuration file to load the old schema, and specifying a path to write out the new file, using the slaptest binary to do the conversion.  Depending on the schema file needing conversion, it may be necessary to load additional schema files as part of the process.
 
For example, to convert the Samba 3.3 schema into an LDIF-format for use with ZCS, one would do the following:
 
  mkdir -p /tmp/ldap/schema
  cd /tmp/ldap
  cp /path/to/samba.schema /tmp/ldap/schema
 
Create a file called "test.conf" with the following contents
 
  include /opt/zimbra/openldap/etc/openldap/schema/core.schema
  include /opt/zimbra/openldap/etc/openldap/schema/cosine.schema
  include /opt/zimbra/openldap/etc/openldap/schema/inetorgperson.schema
  include /tmp/ldap/schema/samba.schema
 
Then execute
  /opt/zimbra/openldap/sbin/slaptest -f /tmp/ldap/test.conf -F /tmp/ldap

Revision as of 18:41, 26 May 2009

When extending ZCS, it is sometimes desirable to add additional LDAP schema to the OpenLDAP server shipped with ZCS. Starting with the 6.0 release, the new config backend is used, which means that the traditional *.schema files are no longer in play. Instead, LDIF-based versions of the old schema files are used by the new config backend. This means that traditional "schema" files need to be converted to the new LDIF format for ZCS to be able to use them. Fortunately, a utility to do this conversion is shipped with the ZCS OpenLDAP build, and the conversion process is fairly trivial. It consists of creating a temporary configuration file to load the old schema, and specifying a path to write out the new file, using the slaptest binary to do the conversion. Depending on the schema file needing conversion, it may be necessary to load additional schema files as part of the process.

For example, to convert the Samba 3.3 schema into an LDIF-format for use with ZCS, one would do the following:

 mkdir -p /tmp/ldap/schema
 cd /tmp/ldap
 cp /path/to/samba.schema /tmp/ldap/schema

Create a file called "test.conf" with the following contents

 include /opt/zimbra/openldap/etc/openldap/schema/core.schema
 include /opt/zimbra/openldap/etc/openldap/schema/cosine.schema
 include /opt/zimbra/openldap/etc/openldap/schema/inetorgperson.schema
 include /tmp/ldap/schema/samba.schema

Then execute

 /opt/zimbra/openldap/sbin/slaptest -f /tmp/ldap/test.conf -F /tmp/ldap
Jump to: navigation, search