# LDAP installation with BS4

**URL:** <https://community.bluespice.com/t/ldap-installation-with-bs4/277>\
**Category:** Bugs\
**Created:** [March 13, 2025, 9:56am UTC](https://community.bluespice.com/t/ldap-installation-with-bs4/277 "2025-03-13T09:56:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![role-end](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@role-end](https://community.bluespice.com/u/role-end)\
**Post date:** [March 13, 2025, 9:56am UTC](https://community.bluespice.com/t/ldap-installation-with-bs4/277/1 "2025-03-13T09:56:42Z")

</div>

Hi,

I ran into issues with LDAP Extensions and BS4 Free.  
My system runs on separated docker containers which are installed via ansible. During installation the latest zip of BS4 Free is downloaded and extracted into the docker. After the installation I clone the LDAP Extensions

- LDAPProvider
- LDAPAuthentication2
- LDAPGroups
- PluggableAuth

to the extension directory.

The versions and the config is the same as in my existing Mediawiki installation (REL1\_40). The only adaptation is the solution from  
[LDAPStack in Bluespice 4.4 - Configuration/Setup - BlueSpice Community](https://community.bluespice.com/t/ldapstack-in-bluespice-4-4/154/4)  
which I have applied in my config.

When running all the maintenance scripts in LDAPProvider everything is working as expected without errors or any problems.

Since a few days the login with the UserLogin Page isn’t working anymore. Sometimes it was possible to login but for the most attempts I get following message back:

“Could not fetch required user info to complete login”

In the trace (see below) there is the binding ok but the ldap\_search returns a false but with error code (Success).

I also checed with a LDAP Admin programm and the search there was successful with my filter and basedn etc.

Traces(sorry some personal information wwere replaced):  
**LDAPProvider Log:**

```auto
Found user DN: 'CN=myUser,OU=USER_S,OU=myCompanyAG,OU=People,OU=myCompany_Holding,DC=myCompany,DC=at'
MediaWiki\Extension\LDAPProvider\Client::getSearchString: User DN is: 'CN=myUser,OU=USER_S,OU=myCompanyAG,OU=People,OU=myCompany_Holding,DC=myCompany,DC=at'
ldap_bind( $linkID, $bindRDN = 'CN=myUser,OU=USER_S,OU=myCompanyAG,OU=People,OU=myCompany_Holding,DC=myCompany,DC=at', $bindPassword = 'XXXX' );
# returns true
ldap_bind( $linkID, $bindRDN = 'cn=LdapAdminUser,cn=Users,dc=myCompany,dc=at', $bindPassword = 'XXXX' );
# returns true
ldap_search( $linkID, $baseDN = 'OU=People,OU=myCompany_Holding,DC=myCompany,DC=at', $filter = '(cn=myUser)', $attributes = ['description', 'givenname', 'distinguishedname', 'displayname', 'memberof', 'name', 'samaccountname', 'userprincipalname', 'objectcategory', 'mail', 'dn', 'telephonenumber', 'cn', 'sn', 'uid'], $attrsonly = , $sizelimit = , $timelimit = , $deref = );
# returns an error (Success)
ldap_error( $linkID );
# returns Success

```

**LDAPAuthentication2 Log**

```auto
Try to authenticate user: myUser
Not local login. Checking LDAP...
LDAP domain: myCompany_Logistik
Error fetching userinfo: Error in LDAP search: Success
#0 /var/www/bluespice/extensions/LDAPProvider/src/UserInfoRequest.php(68): MediaWiki\Extension\LDAPProvider\Client->search('(cn=myUser)', 'OU=People,OU=Kn...', Array)
#1 /var/www/bluespice/extensions/LDAPProvider/src/Client.php(272): MediaWiki\Extension\LDAPProvider\UserInfoRequest->getUserInfo('myUser')
#2 /var/www/bluespice/includes/libs/objectcache/BagOStuff.php(216): MediaWiki\Extension\LDAPProvider\Client->MediaWiki\Extension\LDAPProvider\{closure}(500)
#3 /var/www/bluespice/extensions/LDAPProvider/src/Client.php(263): BagOStuff->getWithSetCallback('bs?hwiki:ldap-p...', 500, Object(Closure))
#4 /var/www/bluespice/extensions/LDAPAuthentication2/src/PluggableAuth.php(271): MediaWiki\Extension\LDAPProvider\Client->getUserInfo('myUser')
#5 /var/www/bluespice/extensions/LDAPAuthentication2/src/PluggableAuth.php(122): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->checkLDAPLogin('myCompany_Logistik', 'myUser', 'myPassword', NULL, NULL, NULL)
#6 /var/www/bluespice/extensions/PluggableAuth/includes/PluggableAuthLogin.php(103): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate(NULL, 'myUser', NULL, NULL, NULL)
#7 /var/www/bluespice/includes/specialpage/SpecialPage.php(701): MediaWiki\Extension\PluggableAuth\PluggableAuthLogin->execute(NULL)
#8 /var/www/bluespice/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)
#9 /var/www/bluespice/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath('PluggableAuthLo...', Object(RequestContext))
#10 /var/www/bluespice/includes/MediaWiki.php(904): MediaWiki->performRequest()
#11 /var/www/bluespice/includes/MediaWiki.php(562): MediaWiki->main()
#12 /var/www/bluespice/index.php(50): MediaWiki->run()
#13 /var/www/bluespice/index.php(46): wfIndexMain()
#14 {main}

```

**PluggableAuth Log:**

```auto
In execute()
Getting PluggableAuth instance
Plugin name: LDAPAuthentication2
Authentication failure.
ERROR: Could not fetch required user info to complete login

```

I have tried now everything but nothing is working. When the login is possible the ldap\_search function doesn’t return the false but the correct data. This happens without changing anything…

---

<div class="post-metadata">

**Author:** ![rvogel](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rvogel](https://community.bluespice.com/u/rvogel)\
**Post date:** [August 21, 2025, 6:18am UTC](https://community.bluespice.com/t/ldap-installation-with-bs4/277/2 "2025-08-21T06:18:08Z")

</div>

This is truly odd.

It there anything in the Logs of the LDAP server?

Could you try to run the search in a dedicated PHP script (without the application context)? Maybe you can adapt [PHP: ldap\_search - Manual](https://www.php.net/manual/en/function.ldap-search.php#112191)

If not, you can try to comment out lines `195` and `200` in `extensions/LDAPProvider/src/PlatformFunctionWrapper.php`

> <https://github.com/wikimedia/mediawiki-extensions-LDAPProvider/blob/2.0.13/src/PlatformFunctionWrapper.php#L195-L200>

After a failed login you should then be able to see traces in the PHP error log.
