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

RE: Issue importing CGP schema into LDAP (centos 7)



I attempted that this morning as well, and will present reference here:
Contents of test.conf

include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema
include         /etc/openldap/schema/misc.schema
include         /etc/openldap/schema/ppolicy.schema
include         /etc/openldap/schema/cgp.schema (the referenced schema for conversion)

testing directory created

slaptest -f test.conf -F testing

error message: 

5909f790 /etc/openldap/schema/cgp.schema: line 8 attributetype: Duplicate attributeType: "2.16.840.1.113730.3.1.241"
slaptest: bad configuration directory!

-----Original Message-----
From: Quanah Gibson-Mount [mailto:quanah@symas.com] 
Sent: Wednesday, May 03, 2017 11:27 AM
To: John Cooter <jcooter@atlantech.net>; openldap-technical@openldap.org
Subject: RE: Issue importing CGP schema into LDAP (centos 7)

--On Wednesday, May 03, 2017 12:17 PM -0400 John Cooter <jcooter@atlantech.net> wrote:

> That was my understanding, that I only needed to include the schema I 
> was trying to convert. The "test.conf" file ONLY had the schema for 
> conversion included. And since "organization" does come from the base 
> schema, I'm wondering WHY I'm getting this error on conversion. I have 
> included the problematic object definition earlier in this thread, and 
> I really don't see why I'm failing. I can post the entire schema I'm 
> trying to convert if that would help. I'm really quite stumped. This 
> should be a simple conversion, but why I'm failing when attempting to 
> attach to an existing objectClass is beyond my understanding.

The test.conf that you are converting has *zero* knowledge of what you have loaded into cn=config.

Generally what one does is, define a test.conf that includes all the necessary schema to convert the additional schema you are converting, and then you do something like:

mkdir -p /tmp/test-config

slaptest -F /tmp/test-config -f test.conf

Then you can use the converted schema that is written into /tmp/test-config.

--Quanah



--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>