Topic on Extension talk:LDAP Authentication

LDAP Authentication and Mediawiki 1.27.1 - Login failed in primary authentication

1
141.160.5.251 (talkcontribs)

CentOS 7

Mediawiki 1.27.1

PHP 5.6.27

LDAP Authentication Plugin 2.1.0

I am attempting to get auto login working using the LDAP Authentication plugin. If I comment out the lines for automatic login, I am able to use my username/password and successfully sign into Mediawiki. If I re-enable automatic login,I am not logged in automatically. If I click the login link, I can use my username and password to log in - if I do this, I get an error on the page (Incorrect password entered. Please try again.) and the following error in the debug data:

  • [authentication] Login failed in primary authentication by MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider

My LocalSettings.php has the following:

require_once( "$IP/extensions/LdapAuthentication/LdapAutoAuthentication.php" );

require_once( "$IP/extensions/LdapAuthentication/LdapAuthentication.php" );

//$wgAuth = new LdapAuthenticationPlugin(); ## Standard Login

$wgLDAPAutoAuthDomain = "<domain name here>"; ## added for autologin

$wgLDAPDomainNames = array( "<domain name here>" );

$wgLDAPServerNames = array( "<domain name here" => "<domain controller here>" );

//$wgLDAPSearchStrings = array( "<domain name here>" => "DOMAIN\\USER-NAME" ); //standard login

$wgLDAPEncryptionType = array( "<domain name here>" => "clear" );

$wgLDAPDebug = 3; //for debugging LDAP

$wgShowExceptionDetails = true; //for debugging MediaWiki

$wgDebugLogGroups['ldap'] = '/var/www/html/wiki/debug.log';

$wgLogQueries=true;

// $wgLDAPAutoAuthUsername = $_SERVER["REMOTE_USER"];

$wgLDAPAutoAuthUsername = preg_replace( '/@./', '', $_SERVER["REMOTE_USER"] );

$wgGroupPermissions['*']['autocreateaccount']=true;

I added the changes to $wgLDAPAutoAuthUsername based on some posts I found; using either line results in the same error.

I have skipped posting some parts of LocalSettings.php due to the information contained in the lines; if you have questions about something that may or may not be in the file, please let me know. Again, given that I am able to log in with the "standard login" lines uncommented and no other changes to the file, it leads me to believe that I am having an issue with the new Authentication method used in Mediawiki 1.27 and higher. However, I have not been able to find a solution that works yet.

On a side note - my PHP error logs do not have any errors and I am not able to write to the debug.log listed above. Yes, the file exists. Yes, I have verified the permissions; I even set them to 777 for testing The above error is from turning on debugging within Mediawiki - that is, displaying the debug data on the site itself.

Any assistance you can give me would be greatly appreciated; I have been banging my head over this for a few weeks now. I did find the new RemoteUser plugin and have started floating that as a possible solution; I've been asked to spend some more time on this before we make the switch.

Reply to "LDAP Authentication and Mediawiki 1.27.1 - Login failed in primary authentication"