本文共 1051 字,大约阅读时间需要 3 分钟。
1、配置svn+sasl通过ldap进行身份验证
yum -y install *sasl*
saslauthd -v(查看验证机制列表)
grep -i mech /etc/sysconfig/saslauthd
先测试用系统用户登录:
sed -i 's#Mech=pam#Mech=shadow#g' /etc/sysconfig/saslauthd(调整验证机制)
/etc/init.d/saslauthd restart
testsaslauthd -usyk -p123456(测试系统用户-成功)
测试用svn用户登录:
sed -i 's#Mech=shadow#Mech=#g' /etc/sysconfig/saslauthd
/etc/init.d/saslauthd restart
vim /etc/saslauthd.conf
添加:
ldap_servers: ldap://www.syk.com/
#ldap_uri: ldap://ldap.syk.syk.com/
#ldap_version: 3
#ldap_start_tls: 0
ldap_bind_dn: cn=admin,dc=syk,dc=com
ldap_bind_pw: syk123
ldap_search_base: ou=People,dc=syk,dc=com
ldap_filter: uid=%U
#ldap_filter: mail=%U@syk.com
ldap_password_attr: userPassword
#ldap_sasl: 0
测试ldap用户:
testsaslauthd -usyk -psyk123(成功)
2、配置:
cd /etc/sasl2/
vim svn.conf
添加:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
cd /data/svndata/sadoc/conf
sed -i 's@# use-sasl = true@use-sasl = true@g' svnserve.conf
vim /data/svnpasswd/authz(修改)
[/]
* = wr
3、用svn客户端使用ldap用户登录,测试都可以通过