dokuwiki与LDAP身份验证

时间:2012-06-09 21:33:47

标签: .htaccess ldap openldap dokuwiki

我在我的工作场所设置了dokuwiki。 我想将身份验证设置为LDAP,但我无法让它工作。 我的公司正在使用OpenLDAP。

我不确定它是否可能,因为我可能没有足够的有关LDAP设置的信息。 在我们的FTP服务器上,我们使用.htaccess进行身份验证

AuthType Basic
AuthName "Authentication"
AuthAuthoritative off
AuthLDAPURL "ldap://ldapref.domain.xx.xy/dc=domain,dc=xx,dc=xy?uid"
require valid-user

我总是收到以下错误:

  

LDAP:无法连接到LDAP服务器

我希望我能以某种方式简单地使用dokuwiki中的.htaccess设置来通过LDAP进行身份验证。

这可能吗?

2 个答案:

答案 0 :(得分:1)

使用ldapsearch工具验证运行LDAP客户端的主机是否可以访问服务器,以及LDAP客户端可以进行身份​​验证。使用某些效果:

ldapsearch -H ldap://ldapref.domain.xx.xy \
  -b dc=domain,dc=xx,xy=at -s sub -x -LLL \
  '(uid=<the-user-id-to-authenticate>)' 1.1

上面的命令假定了自OpenLDAP提到的问题以来的传统OpenLDAP搜索语法。

如果搜索成功,则LDAP客户端应该能够使用相同的参数进行连接和验证。理想情况下,ldapsearch工具应该在将对LDAP服务器进行身份验证的同一系统上执行。

另见

答案 1 :(得分:0)

您所获得的信息应足以配置至少部分authldap插件的日志记录。见https://www.dokuwiki.org/plugin:authldap

当您使用相对常见的OpenLDAP设置时,群组设置也应该相对简单。

此设置可能适用于您:

<?php
/* OpenLDAP config */
$conf['plugin']['authldap']['server']      = 'ldapref.domain.xx.xy';
$conf['plugin']['authldap']['usertree']    = 'uid=%{user}, ou=People,dc=domain,dc=xx,dc=xy';
$conf['plugin']['authldap']['grouptree']   = 'ou=Groups,dc=domain,dc=xx,dc=xy';
$conf['plugin']['authldap']['groupfilter'] = '(&(objectClass=posixGroup)(|(memberUid=%{uid})(gidNumber=%{gid})))';