美国主机Lunarpages

Mediawiki中文技术论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3885|回复: 0

mediawiki用win2008认证

[复制链接]
发表于 2014-2-15 23:31:31 | 显示全部楼层 |阅读模式
Godaddy主机最新优惠码

先确定是否安装php-ldap:yum list|grep
php-ldap; yum install php-ldap
1、下载插件:http://www.mediawiki.org/wiki/Extension:LDAP_Authentication
2、解压到wiki\extensions 下
3、修改
wiki目录下的LocalSettings.php文件,添加下面到wiki/LocalSettings.php,
require_once(
"$IP/extensions/LdapAuthentication/LdapAuthentication.php" );
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array( "pdc.cn" );
$wgLDAPServerNames = array( "pdc.cn" =>
"domain.pdc.cn" );
$wgLDAPSearchStrings = array( "pdc.cn" =>
"pdc\\USER-NAME" );
$wgLDAPEncryptionType = array( "pdc" => "clear"
);
$wgLDAPUseLocal = false;
$wgMinimalPasswordLength = 1;
$wgLDAPBaseDNs = array( "pdc.cn" => "dc=pdc,dc=cn"
);
$wgLDAPSearchAttributes = array( "pdc.cn" =>
"sAMAccountName" );
$wgLDAPRetrievePrefs = array( "pdc.cn" => "true"
);
$wgLDAPDebug = 3; //for debugging LDAP
$wgShowExceptionDetails = true; //for debugging MediaWiki
4、重启apache :service httpd restart
5、用windows域账号登录mediawiki
**
windows登录名有“.”,因此修改wiki/extensions/LdapAuthentication/LdapAuthentication.php
var $LDAPUsername;
var $winlname;//在上面一行下添加该行
$winlname =
str_replace("
",".",$username);;//在下面一行上添加该行
$this->userdn
= $this->getSearchString( $winlname
);//把括号内的值改成$winlname
参考:http://blog.technotesdesk.com/?p=643
绝对的NBA王者---NBA湖人
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

美国HostEase虚拟主机一年198元

Archiver|手机版|小黑屋|Mediawiki中文技术论坛

GMT+8, 2024-11-24 18:29 , Processed in 0.039627 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表