How to configure MediaWiki to access Active Directory on Ubuntu
November 18th, 2008
- sudo apt-get install php5-ldap;
- Download LdapAuthentication.php and copy it to extensions directory;
- edit LocalSettings.php
#LDAP Auth
require_once ‘extensions/LdapAuthentication.php’;
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array(’{#DOMAINNAME#}’);
$wgLDAPServerNames = array(’{#DOMAINNAME#}’ => ‘{#domain_server_host#}’);
$wgLDAPSearchStrings = array(’{#DOMAINNAME#}’ => ‘{#DOMAINNAME#}\\USER-NAME’);
$wgLDAPEncryptionType = array(’{#DOMAINNAME#}’ => ‘clear’);
$wgLDAPUseLocal = false;
$wgMinimalPasswordLength = 1;
$wgLDAPBaseDNs = array(’{#DOMAINNAME#}’ => ‘{#BASEDN#}’);
$wgLDAPSearchAttributes = array(’{#DOMAINNAME#}’ => ’sAMAccountName’);
edit everything that is between {##}.
That is it.
Restart apache and test it.
