首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

ldap怎么自定义属性

2012-06-27 
ldap如何自定义属性Sun Java System Directory Server Enterprise Edition 6.0 管理指南?搜索某个:$ ldaps

ldap如何自定义属性

Sun Java System Directory Server Enterprise Edition 6.0 管理指南

?

搜索某个:
$ ldapsearch -T -b cn=schema "(objectclass=*)" attributeTypes | grep "user defined"
?attributeTypes: ( 1.2.3.4.5.6.7 NAME ( 'blog' 'blogURL' )
?DESC 'URL to a personal weblog'
?SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE
?X-ORIGIN 'user defined' )


二:add(蓝色是需要修改的地方)

首先,进入命令行,运行如下命令
$ cat gender.ldif
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( gender-oid
?NAME ( 'gender' 'gender' )
?DESC 'gender'
?SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
?SINGLE-VALUE )

$ ldapmodify -D cn=admin,cn=Administrators,cn=config -w - -f gender.ldif

?

然后,还需要修改实例中之前用到的ldif文件,在如下内容中增加刚新增的这个属性名

Syntax OBJECT IDENTIFIER ============================================================== Attribute Type Description 1.3.6.1.4.1.1466.115.121.1.3 Bit String 1.3.6.1.4.1.1466.115.121.1.6 Boolean 1.3.6.1.4.1.1466.115.121.1.7 Country String 1.3.6.1.4.1.1466.115.121.1.11 Delivery Method 1.3.6.1.4.1.1466.115.121.1.14 Directory String 1.3.6.1.4.1.1466.115.121.1.15 DIT Content Rule Description 1.3.6.1.4.1.1466.115.121.1.16 DIT Structure Rule Description 1.3.6.1.4.1.1466.115.121.1.17 DN 1.3.6.1.4.1.1466.115.121.1.12 Enhanced Guide 1.3.6.1.4.1.1466.115.121.1.21 Facsimile Telephone Number 1.3.6.1.4.1.1466.115.121.1.22 Fax 1.3.6.1.4.1.1466.115.121.1.23 Generalized Time 1.3.6.1.4.1.1466.115.121.1.24 Guide 1.3.6.1.4.1.1466.115.121.1.25 IA5 String 1.3.6.1.4.1.1466.115.121.1.26 Integer 1.3.6.1.4.1.1466.115.121.1.27 JPEG 1.3.6.1.4.1.1466.115.121.1.28 LDAP Syntax Description 1.3.6.1.4.1.1466.115.121.1.54 Matching Rule Description 1.3.6.1.4.1.1466.115.121.1.30 Matching Rule Use Description 1.3.6.1.4.1.1466.115.121.1.31 Name And Optional UID 1.3.6.1.4.1.1466.115.121.1.34 Name Form Description 1.3.6.1.4.1.1466.115.121.1.35 Numeric String 1.3.6.1.4.1.1466.115.121.1.36 Object Class Description 1.3.6.1.4.1.1466.115.121.1.37 Octet String 1.3.6.1.4.1.1466.115.121.1.40 OID 1.3.6.1.4.1.1466.115.121.1.38 Other Mailbox 1.3.6.1.4.1.1466.115.121.1.39 Postal Address 1.3.6.1.4.1.1466.115.121.1.41 Printable String 1.3.6.1.4.1.1466.115.121.1.44 Substring Assertion 1.3.6.1.4.1.1466.115.121.1.58 Telephone Number 1.3.6.1.4.1.1466.115.121.1.50 Teletex Terminal Identifier 1.3.6.1.4.1.1466.115.121.1.51 Telex Number 1.3.6.1.4.1.1466.115.121.1.52 UTC Time 1.3.6.1.4.1.1466.115.121.1.53

?

参考:

http://blog.csdn.net/leappapa/article/details/2849865

http://hi.baidu.com/tjulxh/blog/item/9e316947e8d9520e6a63e5ae.html

?

热点排行