--- title: Lab Meeting Minutes 2022/10/25 tags: lab_meeting --- > Outline > [TOC] --- # PERAL Lab Meeting - 時間:111 年 10 月 25 日 08:00 - 地點:科三 321 - 出席者:吳坤熹老師、謝萬霖、吳騰然、劉怡君、田蕙瑜、洪胤勛、丘世宇、莊才賢、紀見如、劉冠伶、林大智、繆亭霄 - 會議主題:[LDAP(Lightweight Directory Access Protocol)](https://docs.google.com/presentation/d/1pVttnZxmbS8ntAk051CNYzGTlsiUYzfu4eviFM6WPd4/edit?fbclid=IwAR3e3lBgZ2B4pebZT4BIdbquGEh_yzM5KRpmhtM-YGU5e9Hpe_8YvDfV02I#slide=id.p) - 主講者: 劉怡君 - 主記: 吳騰然 ## 會議內容 ### Directory Service - DNS (Domain Name Service) - NIS (Network Information Service) - Yellow Pages - Server 提供自己的 /etc 底下的檔案(如 passwd, shadow, group, hosts 等)給 Client 搜尋並使用。 - X.500 - A series of protocols for Directory Services(Wikipedia - X.500) - DAP (Directory Access Protocol) is one of the protocol in X.500. It defines the communication between a DUA and a DSA. - LDAP (Lightweight Directory Access Protocol) - A lightweight version of DAP ### Components in X.500 - DSA (Directory System Agent) - Server (提供整合好的 Server) - DUA (Directory User Agent) - Client - DIT (Directory Information Tree) - A hierarchical tree-like structure consisting of entries in the directory service. - Manage by DSA - DtatBase,維護資料庫,由DSA管理 ### DAP to LDAP ![](https://i.imgur.com/zwivQGk.png) ### LDAP (Lightweight Directory Access Protocol) - Centralizing user and authentication information. - The substitute of DAP - Runs over TCP/IP - Connection via port 389 - [rfc 4511](https://datatracker.ietf.org/doc/html/rfc4511) - LDAPS (LDAP over SSL) - Connection via port 636 ### Information Model in LDAP - Entries: the nodes in DIT - Domain Component(DC) - Organization Unit (OU) - Common Name (CN) ![](https://i.imgur.com/wCaNXNM.png) ### Naming Model in LDAP - Defines how entries and data in the DIT are uniquely referenced. - Distinguished Name (DN) - It’s like the absolute path of a filesystem. - ex. cn=ashley, ou=bachelor, dc=pearl, dc=ncnu, dc=org - Relative Distinguished Name (RDN) - It’s like a filename. - ex. cn=ashley ![](https://i.imgur.com/grB20uU.png) ### The LDAP Interchange Format (LDIF) - The format of plain-text files for LDAP server configuration information. - LDIF files are used to import new data into your directory or make changes to existing data. - [Example](http://ms15.voip.edu.tw/~phoebe/files/others/LDAP_example.ldif.txt) - ![](https://i.imgur.com/OnmC7hS.png) ### Object Class - Each Object Class value acts as a template for the data to be stored in an entry. - It defines a set of attributes that must be present in the entry and a set of optional attributes that may or may not be present. [rfc 2256](https://datatracker.ietf.org/doc/html/rfc2256) - Types of Object Class - Structural Object Class - 主要屬性(角色) ex. person, organization - Auxiliary Object Class - 附加屬性 ex. sambaSamAccount (for Samba user) - Abstract Object Class - ex. top (root of the tree) ### Implementations of LDAP - OpenLDAP - For heterogeneous environments. - It is empty after installation and has no DIT. - The database is separate from server itself. - Microsoft AD - Customized for a Microsoft product suite. - Ship with a basic structure and has the GUI tools ready. - It already contains user accounts for your internal users. - Samba AD - Since version 4.0, Samba allows you to provision the Active Directory server role. - More suitable choice for integrating Windows and Linux systems. ### 建議&問題 1. (怎麼沒人要放我進Google Meet會議室?) Ans: 老師好,可以再點一次連結嗎,這邊沒看到老師要求進入 google meet [name=toby] https://meet.google.com/bck-nnaa-pfx (還是沒有嗎?我換台電腦。) 沒看到老師的要求訊息 > [Google Meet 人員限制 10 人](https://apps.google.com/intl/zh-TW/meet/) 目前會議室人數降為九人,麻煩老師再試一次 (還是沒用。看來不是這問題。會後再來弄清楚。) (如果怡君有用麥克風講話,能不能請Jerry用 IP Phone 撥到 1000 給我?這樣至少我可以聽到聲音。) 老師好,已經請 Jerry 撥給老師了[name=toby] Thanks. @Jerry: 我撥1007, 結果 408 Request Timeout. 請回撥4736給我。 (408 Request Timeout的問題等 meeting 結束再查) 老師我於[gathertown 409](https://app.gather.town/app/M31iEgA2veBWAFAA/NCNU-TC-409) 轉播,您試試這樣是否能聽到聲音與畫面 Gather Town 清楚。所以我先把IP Phone 停掉了。謝謝 Jerry 及 Angela. 2. 單字須預先查好發音 [name=Angela] 3. config 檔是不是沒有對應到 PPT 的架構圖中? [name=Lawrence] Ans : 是的,這部分是沒有對應到 PPT 架構圖中[name=Phoebe] 4. 架構圖中最多只能三層嗎?可不可以 OU 下面在一層 OU? [name=Angela] Ans : 不只限於三層,可以 OU 下面在一層 OU,彈性很大[name=Phoebe] 5. P.11 OpenLDAP 中提到的環境(heterogeneous environments)是甚麼?[name=Jennifer] Ans : 是指作業系統中有很多種,EX : FreeBSD、CentOS,可以兼容很多種系統的意思[name=Phoebe] 6. P.3 可以再講一次 DAP 的意思 ? [name=Ashley] Ans : NIS 演變成 DAP/LDAP 不只是安全上的問題,也是隨者使用者的資料越來越多,需要去做改變[name=Phoebe] DAP/LDAP 7. p.5 LDAP 在這裡的功能? [name=August] Ans : 循序漸進的演變,直到最後面 Server 和 Client 都可以進行存取[name=Phoebe] 8. P.8 查的時候的順序是從最上層找嗎?[name=branko] Ans : 待補充 9. Microsoft 的密碼存檔規則和 Linux 的不同,這樣可以透過 LDAP 共用嗎? [name=solomon] 10. P.6 最上層有三個dc,那代表甚麼意思? Ans : 方便可以對到 Domain Server 11. 在實際部屬的時候會用到 DNS 嗎? Ans : 不會 12. LDAP 可以用分散式佈署嗎? Ans : 不行, 13. P.11 準備在佈署在 MS15 上的是哪一個? ANS: 不是佈署在 MS15 上,是獨立架一台 OpenLDAP Server; 但若要將實驗室桌機納入管理,可能使用 SambaAD 較合適 ( 這點已納入後續追蹤 ) 14. p.11 MicrosoftAD 好像也可以用在 Linux 上? [LDAP vs. Active Directory: What's the Difference?](https://www.okta.com/identity-101/ldap-vs-active-directory/) 15. LDAP 使用方式? 我需要提供自己的DN或 IP address 嗎?[name=Edgar] - 不必額外提供資料。你只需要指定你要去哪一台LDAP server 查資料即可。[name=Phoebe] - 每個user的資料,是怎麼寫進configuration中的?新使用者一開始加入時完全沒資料呀?[name=Edgar] - 所以需要由 LDAP 管理者先幫所有人在 LDAP Server 上建帳號及一個預設密碼(像NCNU目前的做法)。使用者用這組密碼登入後,就可以修改密碼。[name=solomon] - (這邊有點雞同鴨講了。Phoebe說的都沒錯,但她沒弄懂Edgar的疑惑是什麼。Edgar最疑惑的是,一台Server加入LDAP domain時會發生什麼事。而他不明白Phoebe所謂的「什麼都不用做」是怎麼回事。) 這樣是否請Phoebe 下次準備好demo環境再解釋較清楚? 好,那我請P 贊成。透過實際demo的過程來解答Edgar疑惑。值星請先介入,暫停本項討論。 Edgar: 實作請勿透過GUI包裝;GUI缺點是很多細節看不到。 17. LDAP 的完整架構圖? [name=Edgar] ## 待追蹤事項 1. 示範 Samba AD 與 Microsoft 的整合. (對,我就是指桌機。) [name=Phoebe] 2. 會議室轉播SOP [name=Angela] ## 臨時動議 1. Wishlist --- 散會結束時間:9:48