兔八哥笔记12:定制你的LDAP目录的Schema
"uid=Ratboy, ou=Accounts, dc=LDAPman, dc=com"
?
Cis
?
Case Ignore String
?
Allows any alphanumeric string.? Information stored using cis is stored with the case preserved, but matches are performed with case ignored.? This is the most commonly used syntax type because of its versatility.
?
ces
?
Case Exact String
?
Allows any alphanumeric string.? Matches against attributes of format cis are case sensitive.? Used for attributes like passwords, where you only wish to match exact strings.
?
int
?
Integer
?
Allows only integers to be stored in this attribute.
?
tel
?
Telephone Number
?
Like cis, but when searching against attributes of this type, the match ignores spaces and dashes.? This allows "510-555-1212" to match "510 555 1212".
?
bin
?
binary
?
Used to store binary data in a standardized format.
?
?
?
?????? 一些LDAP目录允许你添加定制的语法。具体怎样做超出了本文的范围,我只是顺便提醒你一下。当创建自己的语法时,你可以为自己的Attribute指定只允许指定的字符存储在Attribute中,并且你也可以指定匹配规则。
?
?????? 假如你想在目录中存储十六进制的代码,但你并不关心代码以什么格式存储(一些人可能输入00 A2 34 FF,另一些可能输入00a234ff,肯能还有人输入00a2.34ff,你想匹配任何一种格式)。为了满足需要,你需要定义一个新的类型hex的语法,只允许字符串0-9,a-z和空格。匹配将是大小写不敏感的,并删除所有的空格进行格式化。很快!任务完成了。
?
?????? 关于创建自定义的语法更详细的信息,你可以在你使用的LDAP的使用手册中找到。
?
?
?
(5)请恕我冒昧,你是单身吗?(作者有些调侃的味道!)
?
?
?
?????? 一些(不是所有)的LDAP服务器允许你为Attribute指定“single”,它的用处是保证你的目录中的属性只有一个值。我们举个例子:一个员工叫Mike Jones,你可以为它的CN指定多个值(Michael Jones、Mike Jones),但存储它的邮箱时你希望只存储一个值。
?
?
?
好了,本文的第2部分将讨论object class和怎样使用Attribute构建自己的object class,第3部分我们将使用第1和第2部分学习到的知识创建一个新的object class,并设计你的LDAP目录的Schema。
?
?????? 如果你有问题,请发邮件给我:donnelly@ldapman.org.。
?
?
?
2000年8月3日
?
?
?
怎么,你是否想读到后2部分呢?哈哈,我也想!所以,我几天前给Mr. Michael Donnelly发了封邮件,希望能够拜读到后续部分,因为那几天我正在查ObjectClass的内容,Michael Donnelly很快回复了,说后续部分尚未完成,已经计划在近期完成,看来我们要再等待一段时间了。但有些夸张了吧?3年多了,还没写完?不过我们要感谢他所做的工作,至少让我们向LDAP的应用方面迈出了第一步!
?
?
?
?
?
?
?
?
?
?
?
????????????????? ??????????????????????????? ??? ?????兔八哥
?
??????????????????????????????????????????????? ??? 2003-12-4 中午