0

I'm trying to add the schac schema to my OpenLDAP installation using the provided LDIF file but this fails with an "Unexpected token" error:

root [2533] /etc/ldap/schema# ldapadd -Y EXTERNAL -H ldapi:/// -f schac-schema-1.5.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=schac,cn=schema,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
        additional info: olcAttributeTypes: Unexpected token before DESC 'RFC 3066 code for prefered language of communication'EQUALITY caseExactMatchSINGLE-VALUESYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

Here is the top of the LDIF file ; the error happens on the first olcAttributeTypes declaration.

dn: cn=schac,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: schac
olcObjectIdentifier: TERENA 1.3.6.1.4.1.25178
olcObjectIdentifier: schac TERENA:1
olcObjectIdentifier: schacExperimental schac:0
olcObjectIdentifier: schacObjectClass schac:1
olcObjectIdentifier: schacAttributeType schac:2
olcObjectIdentifier: schacExpObjClass schacExperimental:1
olcObjectIdentifier: schacExpAttr schacExperimental:2
olcAttributeTypes: ( schacAttributeType:1
 NAME 'schacMotherTongue'
 DESC 'RFC 3066 code for prefered language of communication'
 EQUALITY caseExactMatch
 SINGLE-VALUE
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
olcAttributeTypes: ( schacAttributeType:2
 NAME 'schacGender'
 DESC 'Representation of human sex (see ISO 5218)'
 EQUALITY integerMatch
 SINGLE-VALUE
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
.... etc...

Since this schema has a great user base I'd be surprised it is malformed so I'm guessing there might be some dependency between the schac schema and some other pre-required schema but this is a wild guess.

I already have 7 other schemas in this OpenLDAP 2.4.47 installation on Debian buster.

Any help is welcome.

phep
  • 414
  • 5
  • 15
  • Did you got that working? Having the same error :( – tuna Jun 23 '22 at 18:53
  • No. This problem is still on our todo-list, unfortunately. Since it is still not a strict *requirement* for us we just worked around it but there shall be a day when... :-/. – phep Jun 27 '22 at 10:00
  • I've solved it for me. You can find the actual schema file at GitHub (https://github.com/REFEDS/SCHAC/blob/master/schema/LDAP.txt). Now its just a matter of using `schema2ldif` to convert it to an LDIF file. I suspect that the provided LDIF file has different indentations which is causing the error. – tuna Jun 28 '22 at 13:59

0 Answers0