前提:本文中openldap安装方式采用解压的方式安装,具体目录结构和yum安装会有不同。
1、在inetorgperson.schema中添加需要自定义的属性
# Custom attributes by deri
attributetype ( 2.16.840.1.113730.3.1.900
NAME 'deriExit'
DESC 'whether the employee is deleted'
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 'deriUpPwdTime'
DESC 'Last password change time'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
attributetype ( 2.16.840.1.113730.3.1.902
NAME 'deriRole'
DESC 'what role does the employee belong to'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
attributetype ( 2.16.840.1.113730.3.1.903
NAME 'deriClients'
DESC 'number of accounts online at the same time'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
此处需要注意OID的选取应该是未被使用的OID,具体参照https://ldap.com/ldap-oid-reference-guide/