分類

近期留言

線上訪客

2024 年 4 月
1234567
891011121314
15161718192021
22232425262728
2930  

分類

近期留言

dotProject 與 AD 整合

最近因為工作上需要一個專案管理的系統
有在考慮測測看 dotProject
但一直沒能專心把它研究研究

大概是安逸太久了,
連讓 dotProject 透過 AD 認證都搞很久
昨天測通了, 今年乾脆來 take a note

其實有先 Google 過
但真正安裝卻又不是那麼一回事
真的懷疑那些文章是轉來轉去的成果
根本沒有實際安裝測試過
最後靠的還是官網的 wiki 才搞定

先說一下安裝環境
因為只是要內部使用,
所以, 一切從「懶」

這次用的 OS 是 Windows XP
然後直接使用 2.5.10 版的 AppServ
安裝方式就是下一步下一步就好了

安裝好 AppServ 後就可以直接進 phpMyadm 網頁建 dotProject 要用的資料庫
接著上網抓最新的 2.1.5 版的 dotProject
解開後就直接放入 AppServ 資料夾中的 www 目錄下
完成就可以開始安裝 dotProject 囉

安裝 dotProject 的第一個畫面就會 check LDAP 是否有支援


預設安裝的 AppServ 是沒有開啟 LDAP 支援的,
調整的方法是編輯 Windows 目錄下的 php.ini 檔案:

找到 Windows Extensions 那個段落內的

;extension=php_ldap.dll

然後將前面的 ; 拿掉後直接存檔
再重新啟動(restart_)一次 Apache 就可以

重啟完 Apache 後就可以再次進入安裝畫面
確認 LDAP 有順利啟用後 (如上圖)
就可以繼續下一步下一步把 dotProject 裝完..

怎樣?! 到這裡都很簡單吧.. XD

接下來 會比較難搞一點點

第一次登入 dotProject 的帳號是 admin, 密碼是 passwd
登入之後就可以進去 System Admin -> System Configuration
來設定 LDAP 以支援 AD 認證

設定方式可以參考官網的說明

這邊摘錄如下:

This explains how you would set up LDAP authentication with Active Directory: Example domain is: dotproject.com, the domain controller is called dc.dotproject.com.

– set the LDAP host to: dc.dotproject.com – set the Base DN to: cn=Users,dc=dotproject,dc=com – this indicates that the system should search the Users folder for valid users. – set the user filter to: (sAMAccountName=%USERNAME%) – this will be the same for all Active Directory installations. – set the LDAP search user and password: You could set this to a user with the administrator role but its safer to make an ldapsearch user with only the permissions required to read the users folder. – set allow standard login on – this is recommended so that if your directory system fails, you can still login to dotproject.

LDAP 畫面上的每個欄位說明一下
(這邊假設 AD 網域是 dotproejct, 則 DN 可能是 dotproject.com 或是 dotproject.local)

LDAP Settings
LDAP Host : 請填入你的 AD 主機名或 IP
LDAP Port : 一般不用改, 除非您的 AD 有去特別動到這部份
LDAP Version : Windows 2003 (含) 以後是 LDAP V3 相容
LDAP Base DN : 帳號所存放在 OU 位置, 使用 AD 時請輸入 dc=dotproject,dc=comdc=dotproject,dc=local
LDAP User Filter : 使用 AD 時請輸入 (sAMAccountName=%USERNAME%)
LDAP Search User : 輸入有權限查詢 AD 的帳號, 假設 Oper 帳號有權限, 則請輸入 cn=Oper,cn=Users,dc=dotproject,dc=local
LDAP Search User Password : 這裡輸入 Oper 這個帳號的密碼
LDAP also allows standard login : 這裡要打 V, 表示除了允許使用 AD 登入外, 也可以使用建資料庫內的帳號登入

當然不要忘了把上面的 User Authentication Method 改成 LDAP

這樣就可以存檔, 然後用 AD 上面的帳號登入囉

測試一下, 果然可以順利登入, 而且帶出 AD 上面的 Display Name

但這裡的 AD 僅做認證用途, 所以登入後會帶入的只有基本權限
必須還要到 User Admin 裡面去設定相關系統或專案權限

就這樣!!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>