Hello all,
While practising with the cn=config, I tried to import a new schema
to an Openldap 2.4.39 server by using the ldapmodify cmd. Can someone
please enlighten me on why the 1st ldif works but not the 2nd one?
The "{4}", which is the only difference between the 1st and the 2nd
ldif, is the index of the next available object under
cn=schema,cn=config
1st (works)
=============
dn: cn={4}eduPerson,cn=schema,cn=config
changetype: add
objectClass: olcSchemaConfig
cn: eduPerson
dn: cn={4}eduPerson,cn=schema,cn=config
changetype: modify
add: olcAttributeTypes
olcAttributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.1
NAME 'eduPersonAffiliation'
DESC 'eduPerson per Internet2 and EDUCAUSE'
EQUALITY caseIgnoreMatch
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
-
add: olcObjectClasses
olcObjectClasses: ( 1.3.6.1.4.1.5923.1.1.2
NAME 'eduPerson'
AUXILIARY
MAY ( eduPersonAffiliation )
)
-
=============
2nd (doesn't work)
=============
dn: cn=eduPerson,cn=schema,cn=config
changetype: add
objectClass: olcSchemaConfig
cn: eduPerson
dn: cn=eduPerson,cn=schema,cn=config
changetype: modify
add: olcAttributeTypes
olcAttributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.1
NAME 'eduPersonAffiliation'
DESC 'eduPerson per Internet2 and EDUCAUSE'
EQUALITY caseIgnoreMatch
SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
-
add: olcObjectClasses
olcObjectClasses: ( 1.3.6.1.4.1.5923.1.1.2
NAME 'eduPerson'
AUXILIARY
MAY ( eduPersonAffiliation )
)
-
=============
The command used, looks like this:
ldapmodify -h localhost -p 389 -D cn=admin,cn=config -x -W -f <filename>
Thanks,
Nikos