ubuntu_subversion_mantis_testlink使用ldap认证

首先把系统的ldap相关认证做好

1
sudo  apt-get  install  libapache2-mod-php5 php5-mysql mysql-server php5 apache2 libphp-adodb libphp-phpmailer php5-ldap php5-gd libnusoap-php


Mantis_ldap认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
vi  /etc/mantis/config_inc .php
#添加如下代码
    $g_login_method=LDAP;
    $g_ldap_server                  =  '192.168.1.13' ;
    $g_ldap_port                    =  '389' ;
    $g_ldap_root_dn                 =  'ou=people,dc=example,dc=net' ;
    $g_ldap_organization            =  '' ;
    $g_ldap_uid_field               =  'uid' ;
    $g_ldap_realname_field          =  'uid' ;
    $g_ldap_bind_dn                 =  '' ;
    $g_ldap_bind_passwd             =  '' ;
    $g_use_ldap_email               = ON;
    $g_use_ldap_realname    = OFF;
    $g_ldap_protocol_version = 3;
    $g_ldap_follow_referrals = ON;
    $g_ldap_simulation_file_path =  '' ;


Testlink_ldap认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
vi  testlink /config .inc.php
$tlCfg->authentication[ 'method' ] =  'LDAP' ; #改为LDAP
/** LDAP authentication credentials */
$tlCfg->authentication[ 'ldap_server' ] =  '192.168.1.13' ;
$tlCfg->authentication[ 'ldap_port' ] =  '389' ;
$tlCfg->authentication[ 'ldap_version' ] =  '3' //  could be  '2'  in  some cases
$tlCfg->authentication[ 'ldap_root_dn' ] =  'ou=people,dc=example,dc=net' ;
$tlCfg->authentication[ 'ldap_organization' ]     =  '' ;     //  e.g.  '(organizationname=*Traffic)'
$tlCfg->authentication[ 'ldap_uid_field' ] =  'uid' //  Use  'sAMAccountName'  for  Active Directory
$tlCfg->authentication[ 'ldap_bind_dn' ] =  'cn=directory manager,dc=example,dc=net' //  Left empty  for  anonymous LDAP binding
$tlCfg->authentication[ 'ldap_bind_passwd' ] =  '123456' //  Left empty  for  anonymous LDAP binding
$tlCfg->authentication[ 'ldap_tls' ] =  false //  true  -> use tls
/** Enable /disable  Users to create accounts on login page */
$tlCfg->user_self_signup = TRUE;

此时重启apache后,还必须手动添加相关用户,不用输入密码,


Subversion_ldap认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
sudo  apt-get  install  subversion libapache2-svn libapache2-mod-ldap-userdir libapache2-mod-vhost-ldap ldap-utils
sudo  a2enmod authnz_ldap  #如果提示 auth provider ldap... 运行这个
vi  /etc/apache2/mods-enabled/dav_svn .conf
<Location  /svn >
   DAV svn
   SVNPath  /local_home/subversion/repos
   AuthType Basic
   AuthName  "Subversion Repository"
   AuthBasicProvider ldap  file  #后面加file就是ldap认证失败,再用本地认证
   AuthzLDAPAuthoritative off
   AuthLDAPURL  "ldap://192.168.1.13:389/ou=People,dc=example,dc=net?uid?sub?(objectClass=*)"
   AuthzSVNAccessFile  /etc/apache2/repos .authz
   Require valid-user
< /Location >

Subversion 这个配置文件前面还加入了binddn什么的,就是找不到用户.直接注释掉,居然OK



本文转自 nonono11 51CTO博客,原文链接:http://blog.51cto.com/abian/1289965,如需转载请自行联系原作者

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值