biblibre / omeka-s-module-Ldap

Authentication with LDAP for Omeka S
https://omeka.org/s/modules/Ldap/
GNU General Public License v3.0
3 stars 2 forks source link

Error with LDAP test connection #14

Closed GildDart closed 1 year ago

GildDart commented 1 year ago

Hello,

I have installed LDAP Module version 0.5.0 with Omeka S 4.0.1

I try to connect to a test server : Online LDAP Test Server - Forum Systems - which is fonctional with JXplorer -

with this configuration in /local.config.php :

'ldap' => [
    'adapter_options' => [
        'server1' => [
            'host' => 'ldap.forumsys.com',
            'username' => 'cn=read-only-admin,dc=example,dc=com',
            'password' => 'password',
            'bindRequiresDn' => true,
            'baseDn' => 'ou=mathematicians,dc=example,dc=com',
            'accountFilterFormat' => '(&(objectClass=posixAccount)(uid=%s))',
            'accountCanonicalForm' => 4,
            'accountDomainName' => 'example.com',
        ],
    ],
],  

I can’t connect to myomekas.com/login where i get the following message : “Email ou mot de passe invalide” and no user is created.

In the logs i get the following message :

Ldap: 0x1: Failed to retrieve DN for account: gauss@example.com [0x51 (Can’t contact LDAP server; getLastError: could not call ldap_get_option because LDAP resource was not of type resource): ldap://ldap.forumsys.com:389]

I tried a lot of other config with no more result.

Could you tell me what’s wrong ? Is it an issue or a incorrect configuration ? Many thanks in advance. Gil

jajm commented 1 year ago

Here's what works for me:

'ldap' => [
    'adapter_options' => [
        'forumsys' => [
            'host' => 'ldap.forumsys.com',
            'port' => '389',
            'accountCanonicalForm' => 2,
            'accountFilterFormat'  => '(&(uid=%s))',
            'username'             => 'cn=read-only-admin,dc=example,dc=com',
            'password'             => 'password',
            'baseDn'               => 'dc=example,dc=com',
            'bindRequiresDn'       => true,
        ],
    ],
],

And I log in with these credentials: gauss / password

GildDart commented 1 year ago

Thank you for your reply.

I tryed this new config this morning but i still can't connect. I finally ask o2switch that told me that it's not possible to connect with ldap and that in addition the port 389 is closed... I will try another way...

jajm commented 1 year ago

Ok, good luck!