MediaWiki authentication with Active Directory

MediaWiki logo without tagline

In order to centralize documentation and provide a way for everybody involved in a project to contribute to the documentation effort for any given project I’ve decided to implement MediaWiki. For this to be a success and actually have people use it, it was necessary to add Active Directory (AD) authentication. With AD authentication users will not need to register with the MediaWiki installation and can start adding or modifying pages immediately.

Here are the steps I used in order to activate AD authentication.

Before we begin:

Installation and Configuration:

Extract the LDAP Authentication Extension to extensions/LdapAuthentication under your MediaWiki root directory.

Add the following code to LocalSettings.php under the MediaWiki root directory (remember to only use the code between the <?php and ?> tags).


Replace the following within the code:

  • mydomain: whatever you wish to call your domain
  • addc01: the server name of a domain controller
  • server plus domain name for your DC

With any luck, you should be able to log in using your Active Directory credential.

2 thoughts on “MediaWiki authentication with Active Directory”

Leave a Reply