Hi,
Coincidentally I was adding a flat .schema file to my cn=config setup yesterday, here’s my (rather brief) notes on the conversion process:
1. Create a temporary directory and put your .schema file in it. mkdir /tmp/schema
2. Create a minimal slapd.conf file containing only an include of the new schema file
cd /tmp/schema cp /etc/openldap/slapd.conf /tmp/slapd.conf.schema Vim slapd.conf.schemaname
Comment everything out Add the following line: include /tmp/schema/schemaname.schema
Generate the schema file using slaptest while in the /tmp/schema directory : /usr/local/authz/sbin/slaptest -f slapd.conf.schemaname -F .
If the conversion process succeeded you should now have a cn=config/cn=schema directory. In order to “ldapadd” it into an existing setup it will need a bit of sanitising. Remove the commented lines and any operational/internal attributes e.g.
structuralObjectClass: olcSchemaConfig entryUUID: dd03fc7a-d4fe-1033-96b0-055318f25a03 creatorsName: cn=config createTimestamp: 20140920104438Z entryCSN: 20140920104438.200261Z#000000#000#000000 modifiersName: cn=config modifyTimestamp: 20140920104438Z
Modify the dn to be “cn=schemaname,cn=schema,cn=config and remove the ordering {0} bracket from the cn
Finally cd to the new schema location and run: /usr/local/authz/bin/ldapadd -D cn=Manager,cn=config -W -f cn={9}schemaname.ldif
Disclaimer: this is the process that worked for me but there are no doubt other/better ways to do this but slaptest is your friend here.
On 20 Sep 2014, at 07:17, Abhishek koserwal abhishek.koserwal@gmail.com wrote:
Hi,
I need some reference material regarding "How to configure customize schema" in OpenLdap2.4.x. I have some schema files of version 2.3<, when slapd.conf were used. I am want to import those schema into new Openldap.2.4.39 . I have gone through Admin guide tried some methods but, I didn't get much help from it. Kindly help me or whom should I contact or any specific materials.
Thank You, Abhishek koserwal,
/****************************
Mark Cairney ITI UNIX Section Information Services University of Edinburgh
Tel: 0131 650 6565 Email: Mark.Cairney@ed.ac.uk PGP: 0x435A9621
*******************************/
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.