Hi Simone, It is not that hard to add a new schema. (for me it’s harder to modify the unique overlays… ;-)) Step by step: 1.
Backup the Database
a.
ldapsearch -h $host -b $ldaproot -D $admin -w $pswd > $outfile 2.
Remove the Database
a.
ldapdelete -h $host -x -r -D $admin -w $pswd $ldaproot 3.
Remove the Access Rules (save it bevore)
a.
ldapmodify -w $pswd -D $backendadmin -h $host -f ./remolcAccess.ldif 4.
shut down the Server
a.
sudo pkill slapd 5.
remove the old schema from “/etc/ldap/schema/" (It is a Ubuntu Server)
a.
sudo rm $directory$schema".schema" 6.
copy the new schema to the dir (and modify it, if you created your schema with “Apache Directory Studio” Otherwise the file can’t be transferred to
the server)
a.
sed ':a;N;$!ba;s/\n)/)/g' $schema".schema" > /etc/ldap/schema/$schema.schema 7.
Create a dir fort he new files
a.
mkdir temp 8.
Create the new ldif files fort he server (The config files contain the include paths for your and the standard files [include /etc/ldap/schema/core.schema \n include /etc/ldap/schema/$schema.schema])
a.
slaptest -v -f $configfile -F temp 9.
Then you need to change some lines in the file
a.
gedit './temp/cn=config/cn=schema/cn={1}'$schema'.ldif'
b.
change the dn and cn to
dn: cn=$schema,cn=schema,cn=config
and remove the lines: structuralObjectClass: olcSchemaConfig
10.
Backup the schemes
a.
mkdir temp/backup
11.
remove the old schemes it is important to replace the X with the next number (You will see what I mean)
a.
rm '/etc/ldap/slapd.d/cn=config/cn=schema/cn={X}vfk.ldif' 12.
Start the server
a.
sudo slapd 13.
transfer the schema to the server
a.
ldapadd -w $pswd -D $backendadmin -h $host -f 'temp/cn=config/cn=schema/cn={1}'$schema'.ldif' –v 14.
transfer the olcAccess back to the server
a.
ldapmodify -w $pswd -D $backendadmin -h $host -f ./accessINIT_orga.ldif 15.
transfer the DB back to the server
a.
ldapadd -D $admin -w $pswd -h $host -f ./$outfile More infos here:
http://www.zytrax.com/books/ldap/ch6/slapd-config.html Please use this information to build up your own solution for the problem, all the written stuff could also be wrong, but it work for my testServer.
I hope this will help you Greetings
JOhn Von: openldap-technical [mailto:openldap-technical-bounces@openldap.org]
Im Auftrag von Simone Taliercio 2015-08-26 6:45 GMT+02:00 Fischer, Johannes <johannes.fischer@ipa.fraunhofer.de>: One „quick“ fix could be to change the schema,
Or you can create a new schema which meet the requirement. (This is the better solution I think) Greetings
John Hi Johannes, Thanks for the tips. Best, Simone |