- 論壇徽章:
- 0
|
1、ldap環(huán)境:
base_dn--dc=yhcompany,dc=com
cn=groups,dc=yhcompany,dc=com
cn=groups02 存放的一些組用戶成員
ou=users,dc=yhcompany,dc=com
cn=900000 存放的是用戶相關(guān)屬性(uid=900000)
cn=900001
2、/etc/httpd/conf.d/authz_ldap.conf文件:
<Location />
DAV svn
SVNParentPath /var/www/svn/
AuthzSVNAccessFile /var/www/svn/conf/authz
AuthzLDAPAuthoritative off
AuthzLDAPMethod ldap
AuthzLDAPServer 172.18.30.232:389
AuthzLDAPUserBase ou=users,dc=yhcompany,dc=com
#AuthLDAPURL "ldap://172.18.30.232:389/DC=yhcompany,DC=com?uid?sub?(objectClass=yh-abstractPerson)
AuthzLDAPUserKey uid
AuthzLDAPUserScope base
AuthType Basic
AuthName "pls login"
satisfy any
require valid-user
3、/var/www/svn/conf/authz文件
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
#group02=900000,900001
#project01的訪問權(quán)限
[project01:/]
abc3=rw
900004=rw
@group02=rw
*=
4、要求
把用戶、密碼、用戶組都放在ldap上,如何讓svn對ldap上的組成員進(jìn)行訪問控制?
=================分隔線=============================
A、如果把紅色部分@group02=rw注釋掉,可以用900004這個(gè)uid去訪問的
B、如果存在紅色部分@group02=rw,則會提示如下報(bào)錯(cuò):
[Mon Oct 21 17:45:35 2013] [error] [client 172.18.21.110] Failed to load the AuthzSVNAccessFile: An authz rule refers to group '@group02', which is undefined
[Mon Oct 21 17:45:35 2013] [error] [client 172.18.21.110] Access denied: '900000‘
后來在網(wǎng)上找到了一篇http://thoughtspark.org/node/26/ 對作者的[groups]有些不解,還有腳本也不知道如何使用(項(xiàng)目急,沒python基礎(chǔ)),
[root@desktop svn_source]# python slg.py ##slg.py其實(shí)就是原作者的python sync_ldap_groups_to_svn_authz.py 文件,添加在附件中
Successfully bound to ldap://172.18.30.232:389...
40 groups found.。
求高手幫幫忙,如何設(shè)置,急。
|
-
-
slg.rar
2013-10-22 09:51 上傳
點(diǎn)擊文件名下載附件
4.86 KB, 下載次數(shù): 4
|