2009年7月14日 星期二

Using Microsoft Active Directory as LDAP

When I setup the Hudson(Continuous Integration) recently, I've trouble while integrating Microsoft Active Directory (AD) as LDAP authenticate server.

I've met the same problem when I setup Mantis(Bug tracking) last time,so I decided to resolve this problem this time...



First of all, you need a LDAP browser tool for better understanding your LDAP schema, I use Microsoft LDP, it's a free, small, efficient tool.


You can download LDP from Microsoft or just google it.

The second, basic knowledge of LDAP would be helpful.

(Maybe you'll need a valid domain account, cause AD doesn't allow anonymous binding by default.)


Below is my configuration snapshot in Hudson and comments.


*LDAP serer:
you can use ldap://ldap.server.ip, the default port is 389
(just ignore the warning "Syntax of server field is SERVER or SERVER:PORT or ldaps://SERVER[:PORT]")


*root DN:
It would like to be "DC=mycompany, DC=com" normally


*User search filter:
PLEASE USE "sAMAccountName={0}" to instead if "uid={0}"


*Manager DN and Manager Password:
If your AD doesn't allow anonymous binding, please put a valid account here.
*** The account format was "mydomain\myaccount" ***
(just ignore the warning "Syntax of server field is SERVER or SERVER:PORT or ldaps://SERVER[:PORT]")


Now, I can use the same account to login CI server(Hudson) and Exchange server.

沒有留言: