锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
LDAP 錛堣交閲忕駭鐩綍璁塊棶鍗忚錛孡ightweight Directory Access Protocol) 鏄疄鐜版彁渚涜縐頒負鐩綍鏈嶅姟鐨勪俊鎭湇鍔°傜洰褰曟湇鍔℃槸涓縐嶇壒孌婄殑鏁版嵁搴撶郴緇燂紝鍏朵笓闂ㄩ拡瀵硅鍙栵紝嫻忚鍜屾悳绱㈡搷浣滆繘琛屼簡鐗瑰畾鐨勪紭鍖栵紝鍥犳瀹冧笉鍚屼簬甯歌鐨勫叧緋誨瀷鏁版嵁搴撱傜洰褰曚竴鑸敤鏉ュ寘鍚弿榪版х殑錛屽熀浜庡睘鎬х殑淇℃伅騫舵敮鎸佺簿緇嗗鏉傜殑榪囨護鑳藉姏銆傜洰褰曚竴鑸笉鏀寔閫氱敤鏁版嵁搴撻拡瀵瑰ぇ閲忔洿鏂版搷浣滄搷浣滈渶瑕佺殑澶嶆潅鐨勪簨鍔$鐞嗘垨鍥炲嵎絳栫暐銆傝岀洰褰曟湇鍔$殑鏇存柊鍒欎竴鑸兘闈炲父綆鍗曘傝繖縐嶇洰褰曞彲浠ュ瓨鍌ㄥ寘鎷釜浜轟俊鎭亀eb 閾劇粨銆乯peg 鍥懼儚絳夊悇縐嶄俊鎭備負浜嗚闂瓨鍌ㄥ湪鐩綍涓殑淇℃伅錛屽氨闇瑕佷嬌鐢ㄨ繍琛屽湪 TCP/IP 涔嬩笂鐨勮闂崗璁?鈥斺?LDAP銆?/p>
LDAP 鐩綍涓殑淇℃伅鏄槸鎸夌収鏍戝瀷緇撴瀯緇勭粐錛屽叿浣撲俊鎭瓨鍌ㄥ湪鏉$洰 (entry) 鏁版嵁緇撴瀯涓傛潯鐩浉褰撲簬鍏崇郴鏁版嵁搴撲腑琛ㄧ殑璁板綍錛涙潯鐩槸鍏鋒湁鍖哄埆鍚?DN 錛圖istinguished Name錛夌殑灞炴э紙Attribute錛夛紝DN 鏄敤鏉ュ紩鐢ㄦ潯鐩殑錛孌N 鐩稿綋浜庡叧緋繪暟鎹簱琛ㄤ腑鐨勫叧閿瓧錛圥rimary Key錛夈傚睘鎬х敱綾誨瀷錛圱ype錛夊拰涓涓垨澶氫釜鍊鹼紙Values錛夌粍鎴愶紝鐩稿綋浜庡叧緋繪暟鎹簱涓殑瀛楁錛團ield錛夌敱瀛楁鍚嶅拰鏁版嵁綾誨瀷緇勬垚錛屽彧鏄負浜嗘柟渚挎绱㈢殑闇瑕侊紝LDAP 涓殑 Type 鍙互鏈夊涓?Value錛岃屼笉鏄叧緋繪暟鎹簱涓負闄嶄綆鏁版嵁鐨勫啑浣欐ц姹傚疄鐜扮殑鍚勪釜鍩熷繀欏繪槸涓嶇浉鍏崇殑銆侺DAP 涓潯鐩殑緇勭粐閫氬父鎸夌収鍦扮悊浣嶇疆鍜岀粍緇囧叧緋昏繘琛岀粍緇囷紝榪欐牱浼氶潪甯哥殑鐩磋銆?br />
鍥?1. LDAP 淇℃伅鐨勬爲鍨嬬粨鏋勫瓨鍌?/strong>
濡傚浘 1 鎵紺猴紝LDAP 鐨勪俊鎭槸浠ユ爲鍨嬬粨鏋勫瓨鍌ㄧ殑錛屽湪鏍戞牴涓鑸畾涔夊浗瀹?(c=CN) 鎴栧煙鍚?(dc=com)錛屽湪鍏朵笅鍒欏線寰瀹氫箟涓涓垨澶氫釜緇勭粐 (organization)(o=CSDL) 鎴栫粍緇囧崟鍏?(organizational units) (ou=Regular)銆備竴涓粍緇囧崟鍏冨彲鑳藉寘鍚濡傛寮忛泧鍛樸佸悎鍚屽伐綾誨瀷闆囧憳絳変俊鎭?/p>
姝ゅ錛孡DAP 鏀寔瀵規潯鐩兘澶熷拰蹇呴』鏀寔鍝簺灞炴ц繘琛屾帶鍒訛紝榪欐槸鏈変竴涓壒孌婄殑縐頒負瀵硅薄綾誨埆 (objectClass) 鐨勫睘鎬ф潵瀹炵幇鐨勩傝灞炴х殑鍊煎喅瀹氫簡璇ユ潯鐩繀欏婚伒寰殑涓浜涜鍒欙紝鍏惰瀹氫簡璇ユ潯鐩兘澶熷強鑷沖皯搴旇鍖呭惈鍝簺灞炴с備緥濡傦細 Person 瀵硅薄綾婚渶瑕佹敮鎸?sn(surname) 鍜?cn(common name) 灞炴э紝浣嗕篃鍙互鍖呭惈鍙夌殑濡傞偖浠?(E-mail)錛岀數璇濆彿鐮?(Phone) 絳夊睘鎬с俤c錛氫竴鏉¤褰曟墍灞炲尯鍩燂紱ou錛氫竴鏉¤褰曟墍灞炵粍緇囷紱cn/uid錛氫竴鏉¤褰曠殑鍚嶅瓧 /ID銆?br />
Many centralized database programs have been developed to allow users to log in on multiple computers using a single password. NIS was one of the first, but it doesn't encrypt the password transaction. It also uses the portmapper daemon, which uses an unpredictable range of TCP ports that are difficult for firewalls to track. LDAP (Lightweight Directory Access Protocol) provides an alternative based on the X.500 standard.
The X.500 standard defines how globally referenced directories of people should be structured. X.500 directories are organized under a common root directory in a tree hierarchy with different levels for each category of information, such as country, state, city, organization, organizational unit, and person. Designed to provide a simpler yet robust implementation of X.500, LDAP was originally used as the backbone of Microsoft's Active Directory Service and Novell's Novell Directory Services (NDS) products. LDAP can also interact with other login programs, such as Remote Authentication Dial-in User Service (RADIUS), which the network equipment of many ISPs uses to manage dialup Internet access.
It was later recognized that LDAP had features that could make it a desirable replacement for NIS in some scenarios. For example, it uses a single TCP port (389) for regular communication and another port (636) for encrypted transactions. LDAP also can interact with many login authentication, authorization, and accounting programs external to Linux and UNIX.
This chapter will first show you how to install and use LDAP on Fedora Linux systems, then go on to explain how LDAP interacts with RADIUS.
Like X.500, LDAP directory entries are arranged in a tree structure. Under the root, there are branches that represent countries, organizations, organizational units, and people.
In complicated LDAP deployments, in which you have to exchange information with the LDAP databases of other companies, you may want to get a formal organization number from the Internet Assigned Numbers Authority (IANA) to reduce any data conflicts. In the chapter's example this won't be necessary. Because there will be no data sharing, I'll just make up one.
These concepts are easier to explain when working from an example, so imagine the IT department in a small organization called example.com has many Linux servers it needs to administer.
........