我正在VMWare Workstation 11下运行一个Linux服务器进行颠覆控制。 我还有一台运行在另一台虚拟机下的Windows Server 2012 R2域控制器。 我正在使用CentOS7,并要configuration身份validation使用活动目录。 我的CentOS7服务器已经join到域中,我可以执行任务来validation我已连接,如。
$id myuser
我安装了mod_ldap,一切似乎都没有问题,但是当我去到网站并尝试validation时,我在错误日志中得到以下消息。
[Thu Mar 05 13:04:32.976448 2015] [auth_basic:error] [pid 2541] [client 192.168.28.1:52099] AH01618: user myuser not found: /svn/testrepo
有一件事我不明白,这是说客户端192.168.28.1,当DC位于192.168.28.3。 也许有什么错,但我不明白为什么它显示的VMNet8适配器的IP。
以下是我的/etc/httpd/conf.d/svn.conf文件中的信息。
<location /svn> DAV svn SVNParentPath /svn AuthType Basic AuthName "Root Repo" AuthUserFile /dev/null AuthLDAPBindDN "CN=Apache User,CN=Users,DC=corp,DC=mydomain,DC=com" AuthLDAPBindPassword apachePassword AuthLDAPURL "ldap://192.168.28.3.corp.mydomain.com:389/DC=corp,DC=mydomain,DC=com?sAMAccountName?sub?(objectClass=*)" require valid-user </location>
这似乎不pipe我如何input凭据,我总是得到上述错误。
我其实自己回答了这个问题。 我不得不改变我的LDAP网址到以下。
AuthLDAPURL "ldap://192.168.28.3/DC=corp,DC=mydomain,DC=com? AMAccountName?sub?(objectClass=*)"
我想添加到IP上的域名是不行的。 我也不得不补充
AuthBasicProvider ldap
所以现在我的文件如下所示。
<location /svn> DAV svn SVNParentPath /svn AuthType Basic AuthBasicProvider ldap AuthName "Root Repo" AuthLDAPURL "ldap://192.168.28.3/DC=corp,DC=mydomain,DC=com? sAMAccountName?sub?(objectClass=*)" AuthLDAPBindDN "CN=Apache User,CN=Users,DC=corp,DC=mydomain,DC=com" AuthLDAPBindPassword apacheUserPassword Require valid-user </location>