Hi,
I have some questions about ldap configuration with Lizmap. See my configuration below :
[modules]
ldapdao.access=1
[coordplugin_auth]
driver=ldapdao
My profile.ini.php file
[ldap:lizmapldap]
hostname=ldap://serverldap
port=389
adminUserDn="CN=USERADM,OU=XXXX,DC=XXX,DC=priv"
adminPassword="PWD"
searchUserBaseDN="DC=XXX,DC=priv"
searchUserFilter="(samaccountname=%%LOGIN%%)"
bindUserDN="samaccountname=%?%,DC=XXX,DC=priv"
searchAttributes="uid:login,givenname:firstname,sn:lastname,mail:email"
searchGroupFilter=
searchGroupProperty="cn"
searchGroupBaseDN=""
I add those parameters (not in doc) in index/auth.coord.ini.php
;--- ldap parameters
[ldapdao]
; profile to use for ldap
ldapprofile = "lizmapldap"
This configuration seems dont block the app. The admin user is still accessible locally. But i can't connect with a user LDAP.
Is there anyway to see traces (debug)?
Did i understand well how lizmap works ? The user is created when logged for the first time isn't it ?
I tried to use ldapsearch command and i found my user.
Can you help ?
The user is created when logged for the first time isn't it ?
yes
>
Yes.
Into lizmap/var/config/localconfig.ini.php, adds this parameters:
[logger]
auth=file
[fileLogger]
auth=auth.log
When trying to login, you will have a lizmap/var/log/auth.log file created and filled with some messages, indicated what happened.
Good hint, thanks. Could this be added to the manual?
I added it into the documentation :)
While configuring LDAP for lizmap auth i notice a little problem. There are various fields in db (jauth.db in my case) that can't be null and the use of the doc example for LDAP produce errors for all the fileds not mapped and it can be only seen debugging the ldap connection.
So if I can, i suggest to modify lizmap-doc (ldap settings) line for searchAttributes as ...
from => searchAttributes="uid:login,givenName:firstname,sn:lastname,mail:email"
to => searchAttributes="uid:login,givenName:firstname,sn:lastname,mail:email,organization:organization,street:street,postcode:postcode,city:city"
[lizmap 3.2.3 on debian9, apache2, postggres9.6]