I am new to OpenLDAP administration. My aim is to learn how to create custom schemas, and customize "my" directory server this way.
I tried to add one optional attribute - ipPhone. Made a schema (dummy) then converted it to the below LDIF file:
dn: cn=dummy,cn=schema,cn=config
changetype: add
objectClass: olcSchemaConfig
cn: dummy
dn: cn=dummy,cn=schema,cn=config
changetype: modify
#changetype: add
add: olcAttributeTypes
olcAttributeTypes: {0}( 1.3.6.1.4.1.4203.666.100.123 NAME 'ipPhone'
DESC 'ip telephone internal or routable number' SUP telephoneNumber )
-
add: olcObjectClasses
olcObjectClasses: {0}( 1.3.6.1.4.1.4203.666.100.1 NAME 'dummyPerson'
DESC 'Dummy-server user' SUP inetOrgPerson STRUCTURAL MAY ipPhone )
When I try to add this schema using ldapmodify(1), I get the below error:
modifying entry "cn=dummy,cn=schema,cn=config"
ldap_modify: No such object (32)
matched DN: cn=schema,cn=config
What did I do wrong? Also, where can I read-up about "changetype"? I am unsure where to use "modify" or "add" for my LDIF.
Thank you.