OSWikiHK: 請協力 GPLv3 的中文翻譯工作。

Webmin ldap users and groups

OSWikiHK,自由中文開源知識庫

目录

設定 Webmin LDAP Users and Groups 管理系統帳戶及 Samba 帳戶

前言

當安裝及設定了 openldap 和 samba 後, 可利用 migrate-tools 輸出系統基礎結構的 ldif 檔案, smbldap-tools 可以直接建立 Samba 的 groupmap, 最後,可以用 Webmin 來管理 LDAP 帳戶和群組。

Webmin 是一個很好的系統管理工具,它有簡單的網頁介面, 多種流行的程式管理模組,一統的介面,管理員不用花太多管理成本, 因為 Webmin 是網頁介面,不用強記復雜的指令, 那我們可委任其他同事或客戶,來處理日常基礎的系統管理。

我是一個 Linux 的初學者,在學習 Samba 期間,希望用 Webmin 來管理 LDAP 帳戶的 Samba 帳戶, 但是互聯網郤找不到完整的 Webmin LDAP Users and Group 設定文件, 只有一份不是英文的文件,在看不明白內容之餘,它還不完整的。

在學習及研究的心態下,只有胡亂的推測,才初步設定好 Webmin LDAP 的 Samba 部份, 因我不懂 Cyrus ,所以未完成 Cyrus IMAP server 部份。

如果內容有錯誤或需要更新,希望各同好代為修正!

Webmin 設定

Webmin version 1.210 點選左上角 System 圖像 --> LDAP Users and Groups --> 點選左上角 Module Config

Module Config

LDAP server options

# 設定 ldap.conf 的位置
Linux LDAP NSS library config file		/etc/openldap/ldap.conf

# 設定 LDAP 伺服器的 host 位置
# (可參看 ldap.conf 的 HOST 或 URI)	
LDAP server host				localhost

# 設定 LDAP 伺服器的 port
LDAP server port				389

# 是否啟動了 TLS
LDAP Use TLS?				        Yes or No

# 設定跟 slapd.conf 的 rootdn 相同	
Bind to LDAP server as			        cn=Manager,dc=samba,dc=hk

# 設定跟 slapd.conf 的 rootpw 相同
Credentials for bind name above			secret 

# 跟用戶容器的 DN 相同
Base for users				        ou=People,dc=samba,dc=hk

# 跟群組容器的 DN 相同
Base for groups				        ou=Groups,dc=samba,dc=hk

# 增加新 objectClasses 到新用戶
Other objectClasses to add to new users		inetOrgPerson

# 增加新 objectClasses 到新群組
Other objectClasses to add to new groups

# 是否顯示 "姓氏" 及 "名字"
Show fields for given name and surname?		Yes

# 設定 slappasswd 的位置
Full path to slappasswd program			slappasswd

LDAP attributes

LDAP properties for all new users

LDAP properties for modified users

Extra LDAP user properties to allow editing of
(In fieldname description format)

LDAP properties for all new groups

LDAP properties for modified groups

# 增加 Webmin LDAP 群組在預設之外的屬性作輸入,
# sambaGroupMapping 的 schema 內,sambaSID 
# 和 sambaGroupType 是必須存在,
# 所以一定要加入 sambaSID 和 sambaGroupType。
# 例子 "sambaSID Samba SID" 第一個英文字 
# "sambaSID" 是 sambaGroupMapping 的其中一個屬性,
# 之後的英文字 "Samba SID" 是輸入項目的註解,
# 你可按你耍要設定。
Extra LDAP group properties to allow editing	sambaSID Samba SID
of (In fieldname description format)		sambaGroupType Samba Group Type
					        description Description
# 增加的屬性可否多重值
Allow multiple values for extra properties?     Yes or No

Samba account options

# 設定 Samba 用戶的 objectClass
LDAP object class for Samba users		sambaSamAccount

# 是否預設啟動 Samba 帳戶
Enabled Samba account by default?		Yes

# Samba 3 的 Domain SID 
# 指令行輸入 net getlocalsid
# 再把結果復製在此
Domain SID for Samba3			        S-1-5-21-3272996132-512357583-2755246907

LDAP properties for new Samba users

# 設定 Samba 群組的 objectClass
LDAP object class for Samba groups		sambaGroupMapping

在 Webmin 內輸入中文

點選左上角 Webmin 圖像 --> Webmin Configuration --> Language

Display in Language 			English (EN)
Character set for HTML pages		UTF-8
Use language specified by browser?	No

因 openldap 2 是採用 UTF-8 編碼,所以 Webmin 也要改成 UTF-8 才可正確輸入中文。 但缺點是 "Webmin介面語言" 不可用中文了。 在指令行執行 ldapsearch 會發現,中文會變成編碼, 但我試過用 Thunderbird (Windows) address book 連上 openldap 伺服器的目錄, 中文是正常的顯示,所以問題不大!

Reno@Samba Hong Kong

Personal tools
廣告橫額