Specifically, I need to add ORDERING caseIgnoreOrderingMatch
to the givenName
and surname
attributes. I had hoped there was some way to do this using ldapmodify
but the following is not working for me (maybe the core schema is read only, but it's giving me a syntax error):
$ ldapmodify -QY EXTERNAL -H ldapi:/// <<EOF
dn: cn=Subschema
changetype: modify
delete: attributetypes
attributetypes: ( 2.5.4.42 NAME ( 'givenName' 'gn' ) DESC 'RFC2256: first name
(s) for which the entity is known by' SUP name )
-
add: attributetypes
attributetypes: ( 2.5.4.42 NAME ( 'givenName' 'gn' ) DESC 'RFC2256: first name
(s) for which the entity is known by' SUP name ORDERING caseIgnoreOrderingMatch )
-
delete: attributetypes
attributetypes: ( 2.5.4.4 NAME ( 'sn' 'surname' ) DESC 'RFC2256: last (family)
name(s) for which the entity is known by' SUP name )
-
add: attributetypes
attributetypes: ( 2.5.4.4 NAME ( 'sn' 'surname' ) DESC 'RFC2256: last (family)
name(s) for which the entity is known by' SUP name ORDERING caseIgnoreOrderingMatch )
EOF
modifying entry "cn=Subschema"
ldap_modify: Invalid syntax (21)
additional info: attributetypes: value #0 invalid per syntax
$
I've seen some suggestions to edit the schema files directly which I didn't want to do, but that (stop slapd, edit /etc/openldap/schema/core.ldif
, restart slapd) seems to have no effect.
Any pointers to how this can be done? My LDAP knowledge is tenuous at best, so any help is appreciated! Thanks.
Best Answer
Figured it out; the examples I was using were geared toward a different distro with slightly different config -- I'm on Scientific Linux 6.5. Combine that with my ignorance, and no wonder it didn't work. Here is what worked:
And for direct file editing, the file path was
/etc/openldap/slapd.d/cn=config/cn=schema/cn={1}core.ldif
but usingldapmodify
is a better method.