剛接觸openLdap,雖然按照網(wǎng)上的安裝方法在XP上成功安裝了,但是很多東西依舊不太明白,看了一些資料,對于一些規(guī)則,命名,定義等有了一定的了解,現(xiàn)在摘錄下來:
接下來的事情就是ldap其實就是一個數(shù)據(jù)庫,不是數(shù)據(jù)庫怎么存放資料呢?不過跟我們平常的關(guān)系數(shù)據(jù)庫
有所不同。關(guān)系數(shù)據(jù)庫是有一張一張的二維表格來存放數(shù)據(jù)的。ldap類似我們的dns系統(tǒng),是樹狀的。用
節(jié)點(diǎn)來存放數(shù)據(jù)。當(dāng)然一個樹枝可以有n個節(jié)點(diǎn),每個節(jié)點(diǎn)上存放的數(shù)據(jù),都是以key => value的形式。
就像我們的dns系統(tǒng)。
我們在安裝openLdap的時候,在slapd.conf文件里會包括進(jìn)一些schema,那么schema起什么作用呢?
schema類似關(guān)系數(shù)據(jù)庫的字段說明,包括字段名,數(shù)據(jù)類型,數(shù)據(jù)長度等等
如何向數(shù)據(jù)庫添加數(shù)據(jù)。ldap不支持sql,所以要用ldapadd這個程序來添加,添加的時候要用一個ldif文
件,把要添加的東西寫在里面,ldif的格式在admin guide里面有說明,我在這里只是簡要說一下。
5. Attribute Types
(LDAP服務(wù)器的實現(xiàn)應(yīng)該可以識別下面列出的屬性類型)
5.1. objectClass
objectClass屬性存在于任意實體中,并且至少包含兩個屬性值,其中的一個值必須是top
或者alias。
5.2. aliasedObjectName
如果包含這個屬性的實體是alias的話,那么目錄服務(wù)就使用aliasedObjectName。
5.3. knowledgeInformation
這個屬性已經(jīng)不再使用。
5.4. cn
cn是X.500種的commonName屬性。包含一個對象的名字,如果對象是person的時候,cn經(jīng)常代表用戶的
全名。
5.6. serialNumber
serialNumber包含一個設(shè)備的序列號。
5.7. c
c包含一個兩位數(shù)字的ISO國家代碼(countryName)
5.8. l
l屬性包含了地區(qū)的名稱,例如城市,鄉(xiāng)鎮(zhèn)或者其他的地理區(qū)域(localityName)
5.9. st
st屬性包含了州或者省的全名(stateOrProvinceName)
5.10. street
street屬性包含實體對應(yīng)的對象的物理地址,例如包裹的郵寄地址。(streetAddress)
5.11. o
o屬性包含了組織的名字。(organizationName)
5.12. ou
ou屬性包含了組織單元的名稱(organizationalUnitName)
5.13. title
title屬性包含了person在組織環(huán)境中的頭銜,例如”Vice President”,personTitle屬性將在作為
person的頭銜獨(dú)立于他們的工作范疇。
5.14. description
description屬性包含了對對象的一個human-readable描述。
5.15. searchGuide
searchGuide屬性是由X.500客戶端用來構(gòu)造檢索過濾器的。它由enhancedSearchGuide屬性代替了。
5.16. businessCategory
businessCategory屬性描述了一個組織的商業(yè)類型。
5.17. postalAddress
郵寄地址屬性。
5.18. postalCode
郵政編碼屬性
5.19. postOfficeBox
郵箱屬性
5.21. telephoneNumber
電話號碼屬性
5.22. telexNumber
電報號碼屬性
5.23. teletexTerminalIdentifier
電報終端標(biāo)識符
5.24. facsimileTelephoneNumber
傳真機(jī)號碼。
5.27. registeredAddress
registeredAddress屬性包含一個收件人的郵寄地址,必須使收件人接受傳遞。
5.28. destinationIndicator
destinationIndicator屬性用來使用電報服務(wù)。
5.31. supportedApplicationContext
This attribute contains the identifiers of OSI application contexts.
supportedApplicationContext屬性包含了OSI應(yīng)用程序標(biāo)識符。
5.32. member
( 2.5.4.31 NAME ''member'' SUP distinguishedName )
5.33. owner
( 2.5.4.32 NAME ''owner'' SUP distinguishedName )
5.34. roleOccupant
( 2.5.4.33 NAME ''roleOccupant'' SUP distinguishedName )
5.35. seeAlso
( 2.5.4.34 NAME ''seeAlso'' SUP distinguishedName )
5.36. userPassword
密碼使用8位字節(jié)的字符串進(jìn)行明文存儲。
5.37. userCertificate
userCertificate屬性通過二進(jìn)制方式存儲和請求,例如”userCertificate;binary”.
5.38. cACertificate
cACertificate屬性通過二進(jìn)制方式存儲和請求,例如”cACertificate;binary”.
5.39. authorityRevocationList.
authorityRevocationList屬性通過二進(jìn)制方式存儲和請求,例如" authorityRevocationList;binary”.
5.43. givenName
givenName屬性用來表示person的部分名字,既不是surname也不是middlename。
5.44. initials
initials屬性包含了一個人的名字中的一些或者全部首字母,但不是surname(s)。
5.48. enhancedSearchGuide
enhancedSearchGuide屬性由X.500客戶端用來構(gòu)造檢索過濾器。
5.51. uniqueMember
唯一的成員。
5.53. supportedAlgorithms
supportedAlgorithms屬性包含了支持的算法。
7. Object Classes
LDAP服務(wù)器必須能夠識別top和subschema這兩個object class。LDAP服務(wù)器應(yīng)該可以識別其他的object class。