Ldap issue with samba4

Nextcloud version 20.0.8 / Debian

Hi,

I am trying to connect nextcloud with a samba4 sever.

I alway get a “wrong dn” message when using ldap wizzard.

I can test account / groups and the test bouton of “advanced” screen says : all ok.

Due to this error I can’t validate config.

I have tried this DN and auth credentials with “ldapadmin” tool and everthing works fine.

ldad used self signed ldaps.

Thank you for your help.

Log is :
{“reqId”:“SVy6eGlJFDSzuSDDRUjA”,“level”:3,“time”:“2021-03-12T14:41:46+00:00”,“remoteAddr”:“192.168.20.219”,“user”:“admin-nextcloud”,“app”:“PHP”,“method”:“POST”,“url”:"/index.php/apps/user_ldap/ajax/wizard.php",“message”:{“Exception”:“Error”,“Message”:“ldap_search(): Search: Operations error at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#341”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/apps/user_ldap/lib/LDAP.php",“line”:229,“function”:“onError”,“class”:“OC\Log\ErrorHandler”,“type”:"::"},{“function”:“OCA\User_LDAP\{closure}”,“class”:“OCA\User_LDAP\LDAP”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“function”:“ldap_search”},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/LDAP.php",“line”:341,“function”:“call_user_func_array”},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/LDAP.php",“line”:234,“function”:“invokeLDAPMethod”,“class”:“OCA\User_LDAP\LDAP”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“function”:“search”,“class”:“OCA\User_LDAP\LDAP”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Access.php",“line”:1094,“function”:“call_user_func_array”},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Access.php",“line”:1098,“function”:“OCA\User_LDAP\{closure}”,“class”:“OCA\User_LDAP\Access”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Access.php",“line”:1151,“function”:“invokeLDAPMethod”,“class”:“OCA\User_LDAP\Access”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Access.php",“line”:1256,“function”:“executeSearch”,“class”:“OCA\User_LDAP\Access”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Access.php",“line”:1063,“function”:“count”,“class”:“OCA\User_LDAP\Access”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Wizard.php",“line”:113,“function”:“countObjects”,“class”:“OCA\User_LDAP\Access”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/user_ldap/lib/Wizard.php",“line”:189,“function”:“countEntries”,“class”:“OCA\User_LDAP\Wizard”,“type”:"->"},{“file”:"/var/www/nextcloud/apps/user_ldap/ajax/wizard.php",“line”:97,“function”:“countInBaseDN”,“class”:“OCA\User_LDAP\Wizard”,“type”:"->"},{“file”:"/var/www/nextcloud/lib/private/Route/Route.php",“line”:156,“args”:["/var/www/nextcloud/apps/user_ldap/ajax/wizard.php"],“function”:“require_once”},{“function”:“OC\Route\{closure}”,“class”:“OC\Route\Route”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"/var/www/nextcloud/lib/private/Route/Router.php",“line”:317,“function”:“call_user_func”},{“file”:"/var/www/nextcloud/lib/base.php",“line”:1008,“function”:“match”,“class”:“OC\Route\Router”,“type”:"->"},{“file”:"/var/www/nextcloud/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::"}],“File”:"/var/www/nextcloud/lib/private/Log/ErrorHandler.php",“Line”:91,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0”,“version”:“20.0.8.1”,“id”:“604b7e627d7b1”}

base dn test bouton says : LDAP Operations error