OpenLDAP 扩展属性(扩展Schemal)实例

01/04 Open LDAP 阅读 3200 views 次 人气 0
摘要:

由于OpenLDAP自带的属性不够用,需要添加自定义的属性,然后才能满足系统的开发和应用。

创建schemal文件:

attributetype ( 2017.1.4.1.0.1.1
	NAME 'passwd'
	DESC 'RFC2256: passwd'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	SINGLE-VALUE )

attributetype ( 2017.1.4.1.0.1.2
	NAME 'randCode'
	DESC 'RFC2256: randCode'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	SINGLE-VALUE )

attributetype ( 2017.1.4.1.0.1.3
	NAME 'applyTime'
	DESC 'RFC2256: applyTime'
	EQUALITY caseIgnoreMatch
	SUBSTR caseIgnoreSubstringsMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
	SINGLE-VALUE )
	
objectclass	( 2017.1.4.1.0.1
    NAME 'what21Authen'
	DESC 'RFC2798: what21Authen'
	SUP top AUXILIARY
	MAY (
		passwd $ randCode $ applyTime)
	)


在/usr/local/etc/openldap/slapd.conf中添加:

include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
include         /usr/local/etc/openldap/schema/what21.schema

添加一条:/usr/local/etc/openldap/schema/what21.schema,然后重启,schemal就可以生效。


参考文档:

http://www.what21.com/article/a_3_1483471328149.html


评论

该文章不支持评论!

分享到: