Closed arek-gios closed 1 year ago
<b>Deprecated</b>: strcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in <b>/var/www/html/modules/Ldap/vendor/laminas/laminas-ldap/src/Ldap.php</b> on line <b>617</b><br /> object(Laminas\Authentication\Result)#616 (3) { ["code":protected]=> int(0) ["identity":protected]=> string(24) "x.xxxx@xxx.xxx.xx" ["messages":protected]=> array(4) { [0]=> string(45) "Authority not found: x.xxxx@xxx.xxx.xx" [1]=> string(0) "" [2]=> string(273) "host=xxx.xxx.xxx.xxx.xx,username=cn=xxx,dc=xxx,dc=xxx,dc=xxx,dc=xx,password=*****,bindRequiresDn=1,baseDn=ou=xxxxxxxx,dc=xxx,dc=xxx,dc=xxx,dc=xx,accountFilterFormat=(&(objectClass=posixAccount)(uid=%s)),accountCanonicalForm=3,accountDomainName=xxx.xxx.xxx.xx" [3]=> string(59) "x.xxxx@xxx.xxx.xx authentication failed: " } }
The fact that you get this message means that it did try to contact the LDAP server and the LDAP server answered with an authentication failure.
I don't know what you tried with tcpdump
but apparently you missed some packets (and I'm not used to it so I cannot help on that topic)
my config /config/local.config.php
'server1' => [ 'host' => 'xxx.xxx.xxx.xxx.xx', 'username' => 'cn=xxx,dc=xxx,dc=xxx,dc=xxx,dc=xx', 'password' => 'xxxxxxx', 'bindRequiresDn' => true, 'baseDn' => 'ou=xxxx xxx,dc=xxx,dc=xxx,dc=xxx,dc=xx', 'accountFilterFormat' => '(&(objectClass=posixAccount)(uid=%s))', 'accountCanonicalForm' => 3, 'accountDomainName' => 'xxx.xxx.xxx.xx', ],
I cannot know what is wrong with this config without knowing more about your LDAP server.
But I notice that the server says "Authority not found: x.xxxx@xxx.xxx.xx" which suggests the canonical form of account names is user@host
, but in your config you have 'accountCanonicalForm' => 3
which is for backslash-style names (e.g., FOO\alice)
Maybe try with accountCanonicalForm = 4 (the default) and try to login with and without the @host
part in the username
I just pushed a commit on master
branch that log all error messages when authentication fails. Try to update the module before doing more tests.
Can you help? I don't know why the module is not working.
The tcpdump indicates that when I try to log into Omeka, nothing connects to the LDAP server (no network traffic to the LDAP server) to check permissions.
The console command (on the same server as Omeka) ldapsearch -x -H ldap://xxx.xxx.xxx.xxx.xx..... returns what it needs, so there is no network lock, the user and password are correct.
php ldap module is loaded, selinux is disabled. Apache2 correctly serves pages on port 80 (without ssl).
php error messages return:
after adding var_dump to the file \Ldap\src\Authentication\Adapter\LdapAdapter.phpLdapAdapter.php
returns more:
my config /config/local.config.php
Omeka log says nothing (system logs don't show anything either)
tail -f /var/www/html/logs/application.log
2023-09-08T09:30:52+00:00 ERR (3): Ldap: 2023-09-08T09:30:52+00:00 ERR (3): Ldap: 2023-09-08T09:40:49+00:00 ERR (3): Ldap: 2023-09-08T09:40:49+00:00 ERR (3): Ldap:
Any idea where I should look for the error?