因项目原因,需要在LDAP中配置inetOrgPerson对象类的两个自定义属性。
  • isAbsent 128字符内的字符串,单值
  • substitutes 128字符内的字符串,多值

参阅了OpenLdap的管理文档以及网上的实例之后,解决方案如下:
编辑OpenLDAP的模式定义文件inetorgperson.schema,增加属性定义
attributetype ( 2.16.840.1.113730.3.1.900
  NAME 'isAbsent'
  DESC 'whether the person is absent from work'
  EQUALITY caseIgnoreMatch
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128}
  SINGLE-VALUE )

attributetype ( 2.16.840.1.113730.3.1.901
  NAME 'substitutes'
  DESC 'people substitutes when absent'
  EQUALITY caseIgnoreMatch
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )

其中2.16.840.1.113730.3.1.900和901是选择未被使用的OID(不知道有没有被使用过?google下吧),而1.3.6.1.4.1.1466.115.121.1.15则是字符串类型的语法。
在inetOrgPerson类中启用这2个属性
objectclass  ( 2.16.840.1.113730.3.2.2
        NAME 'inetOrgPerson'
  DESC 'RFC2798: Internet Organizational Person'
        SUP organizationalPerson
        STRUCTURAL
  MAY (
...
    isAbsent $ substitutes )
  )
在slapd.conf中启用inetorgperson.schema
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
ucdata-path  ./ucdata
include    ./schema/core.schema
include    ./schema/cosine.schema
include    ./schema/inetorgperson.schema
include    ./schema/nis.schema
重新启动LDAP服务之后一切搞定。