Ldap backend doesn't authenticate users

Hi,

I’m prepairing a nextcloud community version for a workgroup. We already use an openldap for managing authoritation of services. So I’ve integrated nextcloud with openldap using app 'LDAP user and group backend '.
Instance details:
Nextcloud version : 29.0.2.2
Operating system and version: Debian bookworm 12.5
nginx version: 1.22.1
PHP version: 8.2.18
'LDAP user and group backend ’ version: 1.20.0

I’ve configured correctly the app user_ldap and users have been provisioned in nextcloud correctly. But when I’ve tested users can’t access nextcloud with message ‘incorrect user or credential’.

I’m debugging app code and I’ve solved the problem adding the Interface ICheckPasswordBackend for class User_LDAP in the file apps/user_ldap/lib/User_LDAP.php
This is my patch:

line 57 :php

//_>
use OCP\User\Backend\ICheckPasswordBackend;
//_>

class User_LDAP extends BackendUtility implements IUserBackend, UserInterface, IUserLDAP, ICountUsersBackend, ICountMappedUsersBackend, IProvideEnabledStateBackend,
//_>
ICheckPasswordBackend
//_>

This class already implements the methods specified in the interface ICheckPasswordBackend so simply adding in the definition everything is ok.
When I add this patch the ldap backend begins to be used to authenticate users.
I’m really grateful for the great job that have been carried out by nextcloud team. I don’t find a similar question in your knowledgebase, so I hope this contribution would be useful.

Bye

Hi @Arturo_Duran_Domingu

Maybe you can post your findings with your patch here:

so the devs of the app will/can take a look over it.


Much and good luck,
ernolf

This is the patch

56a57,59

//>
use OCP\User\Backend\ICheckPasswordBackend;
//
>
58c61,66
< class User_LDAP extends BackendUtility implements IUserBackend, UserInterface, IUserLDAP, ICountUsersBackend, ICountMappedUsersBackend, IProvideEnabledStateBackend {


class User_LDAP extends BackendUtility implements IUserBackend, UserInterface, IUserLDAP, ICountUsersBackend, ICountMappedUsersBackend, IProvideEnabledStateBackend,
//>
ICheckPasswordBackend
//
>

{

Best regards,
Arturo