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
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=%[email protected]
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使用者登入,測試都可以通過
本文轉自 sykmiao 51CTO部落格,原文連結:http://blog.51cto.com/syklinux/1836691,如需轉載請自行聯系原作者