[转贴]谈LDAPschema的定义

 schema包含五大组件:OID,唯一名称NAME,父对象SUP,MUST属性,MAY属性。
下面是一个schema例子:
#
# xlymail-ldap v3 directory schema
#
# written by  hefish@cz8.net
#
# Attribute Type Definitions
attributetype ( 1.3.6.1.4.1.7.1.2.1.1 NAME 'xlyusername'
 DESC 'name of the user on the mailsystem'
 EQUALITY caseIgnoreIA5Match
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-value )
attributetype ( 1.3.6.1.4.1.7.1.2.1.2 NAME 'xlyvuid'
 DESC 'UID of the user on the mailsystem'
 EQUALITY integerMatch
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-value )
attributetype ( 1.3.6.1.4.1.7.1.2.1.3 NAME 'xlyvgid'
 DESC 'GID of the user on the mailsystem'
 EQUALITY integerMatch
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-value )
attributetype ( 1.3.6.1.4.1.7.1.2.1.4 NAME 'xlymaildir'
 DESC 'Path to the maildir/mbox on the mail system'
 EQUALITY caseExactMatch
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-value )
#1.3.6.1.4.1.1466.115.121.1.15 directory
attributetype ( 1.3.6.1.4.1.7.1.2.1.5 NAME 'xlyforwardAddr'
 SUBSTR caseIgnoreSubstringsMatch
 DESC 'Forward mail address'
 EQUALITY caseIgnoreIA5Match
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
 
#Object Class Definitions
objectclass ( 1.3.6.1.4.1.7.1.2.2.1 NAME 'xlymailUser'
 DESC 'xlyMail-LDAP User'
 SUP person STRUCTURAL
 MUST ( xlyusername $ xlyvuid $ xlyvgid )
 MAY ( xlymaildir $ xlyforwardAddr ) )
属性定义注意事项:
  • 唯一标识NAME不能包含下划线‘_’等特殊符号,如果出现会抱错!
  • 括号左右必须以空格隔开,如下面的红色部分是是错误的!!!!

objectclass(1.3.6.1.4.1.7.1.2.2.1 NAME 'xlymailUser'
 DESC 'xlyMail-LDAP User'
 SUP person STRUCTURAL
 MUST ( xlyusername $ xlyvuid $ xlyvgid )
 MAY ( xlymaildir $ xlyforwardAddr ) )

这将导致找不到自定义的objectClass对象类。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值