Closed tuankhanh78 closed 11 months ago
Do not temper wih lizmap-docker-compose/lizmap/var/lizmap-config/localconfig.ini.php
.
Instead, add a config snippet lizmap-docker-compose/lizmap/etc/localconfig.d/
with your ldap configuration.
Hi , Thank for your reply.
Does it mean that I have to copy the file localconfig.ini.php modified for LDAP to the directory izmap-docker-compose/lizmap/etc/localconfig.d/localconfig.ini.php ?
lizmap-docker-compose/lizmap/etc/localconfig.d$ ls README.md test.ini.php
Regards
Does it mean that I have to copy the file localconfig.ini.php
No, don't do this ! Just create a ini.php file with only the ldap configuration section.
Hi,
I create a file as recommended but still have the same result.
lizmap-docker-compose/lizmap$ ls etc/localconfig.d/ localconfig.ini.php README.md test.ini.php lizmap-docker-compose/lizmap$ cat etc/localconfig.d/localconfig.ini.php [modules] ldapdao.access=1
[coordplugin_auth] driver=ldapdao
after reboot the docker container , I can see that those parametres have been added into the file lizmap/var:/lizmap-config/localcionfig.ini.php
lizmap-docker-compose/lizmap$ cat var/lizmap-config/localconfig.ini.php ;<?php die(''); ?> ;for security reasons , don't remove or modify the first line
; put here configuration variables that are specific to this installation
; chmod for files created by Lizmap and Jelix ;chmodFile=0664 ;chmodDir=0775
[modules] ;; uncomment it if you want to use ldap for authentication ;; see documentation to complete the ldap configuration ;ldapdao.access=2
jcommunity.installparam[manualconfig]=on jcommunity.installparam[masteradmin]=off jcommunity.installparam[eps]="[index,admin]" ldapdao.access=1 [coordplugin_auth] driver=ldapdao ;; uncomment it if you want to use ldap for authentication ;; see documentation to complete the ldap configuration ;driver=ldapdao
[mailer] ;; to send email via SMTP, uncomment this line, and fill the section smtp:mailer into profiles.ini.php ;mailerType=smtp
[test_dropin] true_value=true
[coordplugins] lizmap=lizmapConfig.ini.php
but still get the message :: 3liz-lizmap | Setup config php-fpm 3liz-lizmap | Create the account for admin 3liz-lizmap | 2023-01-06 16:02:24 [0] Too few arguments to function ldapdaoAuthDriver::__construct(), 0 passed in /www/lizmap/vendor/jelix/jelix/lib/jelix/core/jAppInstance.php on line 414 and exactly 1 expected /www/lizmap/vendor/jelix/ldapdao-module/ldapdao/plugins/auth/ldapdao/ldapdao.auth.php 30 3liz-lizmap | 3liz-lizmap exited with code 1
I think that the issue in this this section when using LDAP configuration. echo "Create the account for $LIZMAP_ADMIN_LOGIN" source=$LIZMAP_ADMIN_DEFAULT_PASSWORD_SOURCE if [ "$source" == "" ]; then source="default" fi if [ "$source" == "random" ]; then su -c "php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists --admin $LIZMAP_ADMIN_LOGIN $LIZMAP_ADMIN_EMAIL" $LIZMAP_USER elif [ "$source" == "__reset" ]; then su -c "php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists --admin --reset $LIZMAP_ADMIN_LOGIN $LIZMAP_ADMIN_EMAIL" $LIZMAP_USER elif [ "$source" == "__default" ]; then su -c "php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists --admin --reset $LIZMAP_ADMIN_LOGIN $LIZMAP_ADMIN_EMAIL admin" $LIZMAP_USER elif [ -f $source ]; then pass=$(cat $source) su -c "php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists --admin $LIZMAP_ADMIN_LOGIN $LIZMAP_ADMIN_EMAIL $pass" $LIZMAP_USER else echo '[ERROR] Invalid LIZMAP_ADMIN_DEFAULT_SOURCE' exit 1 fi
I'm not the expert here abound ldap and jelix... ping @laurentj.
Not related directly to this repo: see https://github.com/3liz/lizmap-web-client
Hi,
I get this message while trying to setup ldapdao driver. When I uncomment the line driver=ldapdao then I get this message when booting the docker container. lizmap-docker-compose/lizmap/var/lizmap-config$ grep ldap localconfig.ini.php ;; uncomment it if you want to use ldap for authentication ;; see documentation to complete the ldap configuration ;ldapdao.access=2 ldapdao.access=1 ldapdao.enabled=on ldapdao.installparam[noconfigfile]=on ldapdao.localconf=1 ;; uncomment it if you want to use ldap for authentication ;; see documentation to complete the ldap configuration driver=ldapdao
lizmap-docker-compose-lizmap-1 | 2023-01-05 13:20:54 [0] Too few arguments to function ldapdaoAuthDriver::__construct(), 0 passed in /www/lizmap/vendor/jelix/jelix/lib/jelix/core/jAppInstance.php on line 414 and exactly 1 expected /www/lizmap/vendor/jelix/ldapdao-module/ldapdao/plugins/auth/ldapdao/ldapdao.auth.php 30
If I comment this line driver=ldapdao to ;driver=ldapdao then I can boot the lizmap docker container without any issue. After booting the container lizmap then I just uncomment this line driver=ldapdao then I can use LDAP connection.
Is there something wrong when booting the container phase ?
lizmap version 3.6.0 I add jelix/ldapdao-module with this command : composer require "jelix/ldapdao-module" in the docker container (version v2.2.2)
Thank for help
Regards