16 12
发新话题
打印

Linux下SVN AC域认证求助!

Linux下SVN AC域认证求助!

各位好:

我正在测试在AHEL5安装 httpd-2.2.10.tar.gz subversion-1.5.4.tar.gz
并进行AC域认证
apache的mod_ldap.so、mod_authnz_ldap.so 已经编译成功。subversion安装成功。
现在只剩下域认证了。
httpd.conf加载以下语句:
============================
LDAPSharedCacheSize 200000
LDAPCacheEntries 1024
LDAPCacheTTL 600
LDAPOpCacheEntries 1024
LDAPOpCacheTTL 600

<Location /svn/>
     DAV svn
     SVNListParentPath on
     SVNParentPath /usr/local/svnroot
     AuthType Basic
     AuthName "Subversion repository"
     AuthLDAPAuthoritative on
     AuthLDAPURL "ldap://***/ou=***,dc=com"
     Require valid-user
     AuthzSVNAccessFile /usr/local/apache2/conf/access.conf
</Location>
==================================
出现以下错误:        
[root@server bin]# ./apachectl configtest
Syntax error on line 472 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'AuthLDAPAuthoritative', perhaps misspelled or defined by a module not included in the server configuration


请各位帮帮忙。我不胜感激!谢谢!
测试成功请给出配置文件。不胜感激!
请不要让我参考其它贴子,我搜索并查看了很多。没有解决问题。
rpm包安装方式等这个成功后进行测试。

TOP

上面写错了是AD域认证.

自已顶一下!

TOP

似乎你的mod_authnz_ldap模块配置并不准确,你使用的指示并不存在:
你应该参考2.2的文档:

http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html
我的Blog:http://rocksun.cn

TOP

谢谢rocksun版主的建议。
此文档我查看过,不过不太懂问题出在哪里。下面给出我的配置过程,
请大家帮忙分析分析,不胜感激。
=================================
安装apr-1.3.2.tar.bz2 apr-util-1.3.2.tar.bz2两个包。
然后编译安装apache2.2.10
./configure --enable-mods-shared=most --enable-so --enable-ssl --enable-authnz-ldap --enable-ldap --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
make
make install 中间是没有报错的。
==================================
如果用apache2.2.10里的srclib里手工编译 apr  apr-util
再安装apache时编译会报错。在RHEL4 RHEL5都试过了,apache2.2.9
apache2.2.10都试过编译不成功,make报错.
根据官方文档估计是 apr  apr-util 自带的版本低原因。
==================================

TOP

你的配置应该是按照以前的方式进行的
其中你用到了这个指示:

AuthLDAPAuthoritative

在mod_authnz_ldap和mod_ldap模块中都没有对应的指示(看Apache文档的右侧),所以很可能根本就是错误的,2.2的ldap配置我也没有做过,你可以仔细看看apache的文档。
我的Blog:http://rocksun.cn

TOP

应该是 AuthzLDAPAuthoritative
而不是 AuthLDAPAuthoritative
我的Blog:http://rocksun.cn

TOP

请看Apache2.2中文文档
=====================================================================
示例配置
下面的配置是一个使用mod_ldap模块来提升mod_authnz_ldap提供的HTTP基本认证性能的例子。

# 开启LDAP连接池及共享内存缓冲。
# 开启LDAP缓冲状态处理器。需要载入mod_ldap和mod_authnz_ldap模块。
# 把"yourdomain.example.com"改为你真实的域名。

LDAPSharedCacheSize 200000
LDAPCacheEntries 1024
LDAPCacheTTL 600
LDAPOpCacheEntries 1024
LDAPOpCacheTTL 600

<Location /ldap-status>

SetHandler ldap-status
Order deny,allow
Deny from all
Allow from yourdomain.example.com
AuthLDAPEnabled on
AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
AuthLDAPAuthoritative on
require valid-user

</Location>
======================================
我用以上配置测试时报同样的错

TOP

top
英文文档修改过,但中文文档没有作修改!
====================================
Example Configuration

The following is an example configuration that uses mod_ldap to increase the performance of HTTP Basic authentication provided by mod_authnz_ldap.

# Enable the LDAP connection pool and shared
# memory cache. Enable the LDAP cache status
# handler. Requires that mod_ldap and mod_authnz_ldap
# be loaded. Change the "yourdomain.example.com" to
# match your domain.

LDAPSharedCacheSize 200000
LDAPCacheEntries 1024
LDAPCacheTTL 600
LDAPOpCacheEntries 1024
LDAPOpCacheTTL 600

<Location /ldap-status>
SetHandler ldap-status
Order deny,allow
Deny from all
Allow from yourdomain.example.com
AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
AuthzLDAPAuthoritative off
Require valid-user
</Location>

TOP

配置如下,访问时报错。各位请帮帮忙。
=======================================================
<Location /svn/>
     DAV svn
     SVNListParentPath on
     SVNParentPath /usr/local/svnroot
     AuthType Basic
     AuthBasicProvider ldap
     AuthName "Subversion repository"
     AuthzLDAPAuthoritative off
     AuthLDAPRemoteUserIsDN Off
     AuthLDAPURL "ldap://10.10.21.109:389/DC=happy,DC=com?sAMAccountName?sub?(objectClass=*)"NONE
     AuthLDAPBindDN "cn=myname,dc=happy,dc=com"
     AuthLDAPBindPassword "mysecret"
     AuthLDAPGroupAttributeIsDN on
     Require valid-user
     AuthzSVNAccessFile /usr/local/apache2/conf/access.conf
</Location>
=======================================
[root@server logs]# tail error_log
[Tue Nov 25 14:32:59 2008] [warn] [client 10.10.21.70] [3956] auth_ldap authenticate: user zhuxuezhi authentication failed; URI /svn/proj1 [LDAP: ldap_simple_bind_s() failed][Invalid credentials]
[Tue Nov 25 14:32:59 2008] [error] [client 10.10.21.70] user zhuxuezhi: authentication failure for "/svn/proj1": Password Mismatch
=======================================

TOP

不知道你有没有看过这个:

http://www.jejik.com/articles/20 ... t_active_directory/

AuthLDAPURL "ldap://10.10.21.109:389/DC=happy,DC=com?sAMAccountName?sub?(objectClass=*)"NONE

我看你的none前面没有空格?
我的Blog:http://rocksun.cn

TOP

 16 12
发新话题