Windows Server 2012R2
MediaWiki | 1.35.1 |
PHP | 7.4.14 (cgi-fcgi) |
MySQL | 5.7.13-log |
LDAPAuthentication2 1.0.2 (58e281c) 07:04, 7 January 2021
LDAPAuthorization 1.1.0 (e037664) 19:38, 9 July 2020
LDAPProvider 1.0.5 (ca854c1) 07:54, 14 December 2020
LDAPUserInfo 1.0.0 (39cca83) 19:58, 9 July 2020
PluggableAuth 5.7 (2a465ae) 15:07, 10 July 2020
LocalSettings.php:
wfLoadExtension( 'LDAPProvider' );
wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'LDAPAuthentication2' );
wfLoadExtension( 'LDAPUserInfo' );
wfLoadExtension( 'LDAPAuthorization' );
$LDAPProviderDomainConfigProvider = function() {
$config = [
'server.ssv.ww.lcl' => [
'connection' => [
"server" => "server.ssv.ww.lcl",
"port" => "389",
"user" => "pre\\account",
"pass" => 'password',
"options" => [ "LDAP_OPT_DEREF" => 1 ],
"basedn" => "CN=containerNameHere,DC=ssv,DC=ww,DC=lcl",
"groupbasedn" => "CN=Groups,CN=containerNameHere,DC=ssv,DC=ww,DC=lcl",
"userbasedn" => "CN=Users,CN=containerNameHere,DC=ssv,DC=ww,DC=lcl",
"searchattribute" => "sAMAccountName",
"searchstring" => "pre\\USER-NAME",
"usernameattribute" => "sAMAccountName",
"realnameattribute" => "cn",
"emailattribute" => "mail",
"nestedgroups" => true,
"grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupUniqueMember::factory"
# ],
# "groupsync" => [ # ],
# "userinfo" => [ ]
]
];
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
};
$LDAPAuthentication2UsernameNormalizer = 'strtolower';
LDAPProvider\maintenance\CheckLogin.php says "OK" to my account but running ShowUserGroups with same -u and -d input gives "C:\MediaWiki\extensions\LDAPProvider\src\Client.php: Error in LDAP search: No such object" and ShowUserGroups says "PHP Warning: ldap_count_entries() expects parameter 2 to be resource, bool given in C:\MediaWiki\extensions\LDAPProvider\src\PlatformFunctionWrapper.php on line 295" along with the same error in Client.php as above. The line of code in Client that throws the error is this one:
if ( !$res ) { throw new MWException( "Error in LDAP search: " . $this->connection->error() ); } which is in this function: public function search( $match, $basedn = null, $attrs = [ "*" ] )
Any ideas on how I should proceed to troubleshoot this?