Is there a way to delete olcAttributeTypes from my schema?
It's not a system attribute, I added it myself, now I need to delete it.
I'm using LAM (LDAP Account Manager) v5.6
The attribute is located at /etc/openldap/slapd.d/cn=config/cn=schema.ldif
The way I added it was ldapmodify -Y EXTERNAL -H ldapi:/// -f ldif.ldif
Contents of ldif.ldif
were:
dn: cn=schema,cn=config
changetype: modify
add: olcAttributeTypes
olcAttributeTypes: ( 1.3.6.1.4.1.60136.2
NAME 'dateOfBirth'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
Output of cat /etc/openldap/slapd.d/cn\=config/cn\=schema.ldif
:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 a489687b
dn: cn=schema
objectClass: olcSchemaConfig
cn: schema
structuralObjectClass: olcSchemaConfig
entryUUID: 9ebc4cc8-4b31-1036-91fd-05bd7cf95e2a
creatorsName: cn=config
createTimestamp: 20161130101510Z
olcAttributeTypes: {0}( 1.3.6.1.4.1.60136.2 NAME 'dateOfBirth' EQUALITY
caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.146
6.115.121.1.15 )
Bonus question:
How to delete olcObjectClasses?
Another bonus question:
Why do all my classes and attributes dissapear from all entries when slapd.service restarts?
It's fixed with creating a new .ldif file and adding the same classes and attributes again.
Even though classes and attributes dissapear from schema and I can't view entires' values of those attributes, it is back again after applying .ldif file