- 论坛徽章:
- 0
|
1、ldap环境:
base_dn--dc=yhcompany,dc=com
cn=groups,dc=yhcompany,dc=com
cn=groups02 存放的一些组用户成员
ou=users,dc=yhcompany,dc=com
cn=900000 存放的是用户相关属性(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的访问权限
[project01:/]
abc3=rw
900004=rw
@group02=rw
*=
4、要求
把用户、密码、用户组都放在ldap上,如何让svn对ldap上的组成员进行访问控制?
=================分隔线=============================
A、如果把红色部分@group02=rw注释掉,可以用900004这个uid去访问的
B、如果存在红色部分@group02=rw,则会提示如下报错:
[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‘
后来在网上找到了一篇http://thoughtspark.org/node/26/ 对作者的[groups]有些不解,还有脚本也不知道如何使用(项目急,没python基础),
[root@desktop svn_source]# python slg.py ##slg.py其实就是原作者的python sync_ldap_groups_to_svn_authz.py 文件,添加在附件中
Successfully bound to ldap://172.18.30.232:389...
40 groups found.。
求高手帮帮忙,如何设置,急。
|
|