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

Re: objectclasses as part of schema file

On Thu, Mar 03, 2011 at 12:28:03AM +0100, Aleksandar Stoisavljevic wrote:

> I've came to conclusion that client has custom schema files. Let's call them
> foo.schema and foo_v3.schema

> My intention was to change slapd.conf file so that these two are now
> included (include directive in the the top of the slapd.conf file).

Unfortunately each LDAP server has a slightly different internal format
for storing schema definitions. You cannot generally take files from
TDS and use them directly in OpenLDAP, though the edits required to
make them compatible may not be too large.

You could try extracting the schema from TDS via LDAP and then loading
it into OpenLDAP the same way (you need an OpenLDAP server with the
'config' backend for this). Here are some commands that might help you
to extract the existing schema:

SCHEMA=`ldapsearch -LLL \
        -H "ldap://${servername}:${serverport}/"; \
        -s base \
        -b '' \
        -x '(objectclass=*)' subschemasubentry | sed -n -e 's/^subschemasubentry: //ip'`

ldapsearch -LLL \
        -H "ldap://${servername}:${serverport}/"; \
        -s base \
        -b "$SCHEMA" \
        -x '(objectclass=*)' objectclasses

Note that you will get *all* the objectclasses this way, so you will
need to edit the resulting list to contain only the ones you really
need to add.

Note also that the flags I have given here assume the use of OpenLDAP
versions of ldapsearch. The IBM ones differ in some respects.

To work out which attribute types and object classes were added to TDS
after installation, look in .../etc/v3.modifiedschema - anything added
through the LDAP protocol should end up in that file.

|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|     http://www.skills-1st.co.uk/                +44 1628 782565     |