Phabricator实践(2):配置——LDAP登录验证

1. 创建初始管理员账户

参照官方文档:http://www.phabricator.com/docs/phabricator/article/Configuring_Accounts_and_Registration.html

$ ./phabricator/bin/accountadmin
Enter a username to create a new account or edit an existing account.

  Enter a username:

2. 配置LDAP集成

2.1 安装php-ldap模块

因为我选择的php5.3.3,所以安装的是php53-php:

yum install php53-ldap

2.2 配置LDAP参数:

使用管理员账户登录,进入:config->Integration With LDAP,截图如下:

   配置具体参数的过程比较纠结,如下是我的配置方式:

  • ldap.auth-enabled=true
  • ldap.hostname=ldap://ldap.xxx.com
  • ldap.port=389
  • ldap.anonymous-user-name=xxx
  • ldap.anonymous-user-password=xxx
  • ldap.base_dn=OU=xxx,DC=xxx,DC=com
  • ldap.search_attribute=samaccountname
  • ldap.real_name_attributes=["given","sn"]
  • ldap.activedirectory_domain=xxx.com

   备注:根据LDAP服务器的实际配置,以上参数可能需要做相应调整。

3. 使用LDAP账户登录

  使用LDAP账户登录后,Phabricator会根据邮件账户在数据库创建相应账户,一个邮件只能一次。

4. LDAP账户绑定

  可以将password-based authentication类型的账户和LDAP账户进行绑定。实例:

  • 我一般在后台创建特定管理员账户,让后将这个账户绑定到对应的LDAP账户。
  • 使用LDAP账户初次登陆时,Phabricator会自动创建一个已Emial的ID的账户,并将此账户与LDAP账户自动链接上。
原文地址:https://www.cnblogs.com/zhangqingsh/p/3015778.html