I have been testing how to extend OpenLDAP / SLAPD Schema on an Umbuntu 12.04 and OpenLDAP - 2.4.28-1.1ubuntu4.4.
I made the following changes -
Made a new schma file in /etc/ldap/schema called test.schema:
# incAccessCard
attributetype ( 1.3.6.1.4.1.666.1.3803
NAME 'incAccessCard'
DESC 'incAccessCard '
EQUALITY caseIgnoreMatch
SYNTAX 1.3.66.1.4.1.1466.115.121.1.15)
# SEL Alliance System incPINcode
attributetype ( 1.3.6.1.4.1.666.1.3804
NAME 'incPINcode'
DESC 'incPINcode'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.66.1.4.1.1466.115.121.1.15)
# SEL Alliance Project Object
objectClass (1.3.6.1.4.1.666.1.3805
NAME 'TestProject'
DESC 'Object Class for OpenLDAP Schema Extension'
SUB organizationalPerson
MAY (incAccessCard $ incPINcode ))
Added the following to the user/share/slapd slapd.conf file -
include /etc/ldap/schema/test.schema
Stopped and started LDAP with -
sudo invoke-rc.d slapd restart
Created an LDIF file of -
version:1
# testuser, users, testldap.local
dn: cn=testuser,ou=users,dc=testldap,dc=local
changetype: modify
add: incAccessCard
incAccessCard: FFFFFFFF
Ran the following -
ldapmodify -H ldap://testldap.local -x -D "cn=admin,dc=testldap,dc=local" -f ~/Desktop/Schema/modify.ldif -w test123$
I end up receiving the following -
modifying entry "cn=testuser,ou=users,dc=testldap,dc=local"
ldap_modify: Undefined attribute type (17)
additional info: incAccessCard: attribute type undefined
What am I missing?
Any help would be greatly appreciating!
Tim