Monday 9 November 2020

Mwdiawiki new setup: Could not successfully connect to an LDAP server

We are unable to connect to AS Server, our config need some correction. below are details of our config & error.

We have some confusion on the configuration. Please correct us.

  1. require_once should be LdapAuthenticationRequest.php or LdapAuthentication.php
  2. if we uncomment "$wgAuth = new LdapAuthenticationPlugin();" mediawiki webpage goes blank.
  3. what else we need to check or enable eg extension's?

MediaWiki version 1.333
PHP version 7.2.34
Database type and version 5.7.31

LocalSettings.php

#AD Configuration

require_once ("extensions/LdapAuth/src/Auth/LdapAuthenticationRequest.php");

#$wgAuth = new LdapAuthenticationPlugin();

$wgLDAPDomainNames = array('ORG.DEP.CO.IN');

$wgLDAPServerNames = array('ORG.DEP.CO.IN' => 'DEP-A01.ORG.DEP.CO.IN');

$wgLDAPSearchStrings = array('ORG.DEP.CO.IN' => 'uid=wikiuser,OU=Service Accounts,DC=ORG,DC=DEP,DC=CO,DC=IN');

$wgLDAPEncryptionType = array('ORG.DEP.CO.IN' => 'none');

$wgLDAPUseLocal = false;

$wgMinimalPasswordLength = 1;

$wgLDAPDebug = 3; //for debugging LDAP

$wgShowExceptionDetails = true; //for debugging MediaWiki

$wgShowDBErrorBacktrace = true;

$wgShowSQLErrors = true;

$wgDebugLogFile = '../tmp/ldapdebug.log';


wfLoadExtension( 'LdapAuth' );

$wgLdapAuthDomainNames = array('ORG.DEP.CO.IN','DEP-A01.ORG.DEP.CO.IN');

$wgLdapAuthServers = 'inter_ip';

$wgLdapAuthBindDN = 'CN=wikiuser,OU=Service Accounts,DC=ORG,DC=DEP,DC=CO,DC=IN';

$wgLdapAuthBindPass = 'password';

$wgLdapAuthBaseDN = 'OU=Users,DC=ORG,DC=DEP,DC=CO,DC=IN';

$wgLdapAuthIsActiveDirectory = true;

/tmp/ldapdebug.log error

[error] [X6V8pJ@ftlsqOlm9HnuXbgAAAAQ] /index.php?title=Special:UserLogin   ErrorException from line 370 of /home/wikiDEPco/public_html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: PHP Warning: Illegal string offset 'ORG.DEP.CO.IN'

[error] [X6V8pJ@ftlsqOlm9HnuXbgAAAAQ] /index.php?title=Special:UserLogin   ErrorException from line 371 of /home/wikiDEPco/public_html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: PHP Warning: Illegal string offset 'ORG.DEP.CO.IN'

[error] [X6V8pJ@ftlsqOlm9HnuXbgAAAAQ] /index.php?title=Special:UserLogin   ErrorException from line 372 of /home/wikiDEPco/public_html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: PHP Warning: Illegal string offset 'ORG.DEP.CO.IN'

[DBQuery] SELECT  lc_value  FROM `DEP_l10n_cache`    WHERE lc_lang = 'en' AND lc_key = 'messages:ldapauth-attempt-bind-dn-search'  LIMIT 1

[authentication] Attempting to bind to LDAP for search with DN "C@ORG.DEP.CO.IN".

[error] [X6V8pJ@ftlsqOlm9HnuXbgAAAAQ] /index.php?title=Special:UserLogin   ErrorException from line 388 of /home/wikiDEPco/public_html/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php: PHP Warning: Invalid argument supplied for foreach()


from Mwdiawiki new setup: Could not successfully connect to an LDAP server

No comments:

Post a Comment