LDAP configuration not working

11 months 3 weeks ago #189556 by franciscohosting
Hello everyone, I'm trying to automate the configuration of LimeSurvey to use LDAP (everything in containers), the images that Im using are osixia/openldap and martialblog/limesurvey v 3.17.17, I can configurate everything and getting it working by graphic interface (web browser), but when I try to do it by an .sh It dosent work.

What am I doing wrong?

My LimeSurvey cfg is:
<?php if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
| -------------------------------------------------------------------
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
| -------------------------------------------------------------------
| -------------------------------------------------------------------
|   'connectionString' Hostname, database, port and database type for
|    the connection. Driver example: mysql. Currently supported:
|               mysql, pgsql, mssql, sqlite, oci
|   'username' The username used to connect to the database
|   'password' The password used to connect to the database
|   'tablePrefix' You can add an optional prefix, which will be added
|               to the table name when using the Active Record class
return array(
    'components' => array(
        'db' => array(
            'connectionString' => 'mysql:host=mysql;port=1337;dbname=limesurvey;',
            'emulatePrepare' => true,
            'username' => 'someuser',
            'password' => 'somepass',
            'charset' => 'utf8mb4',
            'tablePrefix' => 'lime_',
        'urlManager' => array(
	    'baseUrl' => 'https://some.page/limesurvey',
            'urlFormat' => 'path',
            'rules' => array(
                // You can add your own rules here
            'showScriptName' => true,
	'request' => array(
	    'hostInfo' => 'https://some.page/limesurvey',
        'debugsql'=>0, // Set this to 1 to enable sql logging, only active when debug = 2
/* End of file config.php */
/* Location: ./application/config/config.php */

Using that cfg without anything else doesn't show me that the LDAP plugin is activated in the web browser.
maybe it was the ldap.cfg missing so I completed it (didn't work), and when I configure it by admin in a web browser it only updates the sql database and not the ldap.cfg, even though here it goes:
$serverId = 0;
$ldap_server[$serverId]['server'] = 'ldap';
$ldap_server[$serverId]['port'] = '398';
$ldap_server[$serverId]['protoversion'] = 'ldapv3';
$ldap_server[$serverId]['encrypt'] = 'none';
$ldap_server[$serverId]['referrals'] = true;
$ldap_server[$serverId]['binddn']	= 'cn=admin,dc=someuser,dc=com';
$ldap_server[$serverId]['bindpw']	= 'somepass';
$query_id = 0;
$ldap_queries[$query_id]['ldapServerId'] = 0;
$ldap_queries[$query_id]['name'] = 'cn';
$ldap_queries[$query_id]['userbase'] = 'ou=Users,dc=someuser,dc=com';
$ldap_queries[$query_id]['userfilter'] = '(&(objectClass=inetOrgPerson))';
$ldap_queries[$query_id]['userscope'] = 'base';
$ldap_queries[$query_id]['lastname_attr'] = 'sn';
$ldap_queries[$query_id]['email_attr'] = 'mail';
$ldap_queries[$query_id]['token_attr'] = '';
return array('ldap_server' => $ldap_server, 'ldap_queries' => $ldap_queries);

First time posting be kind haha, thanks!

Please Log in to join the conversation.

LimeSurvey Partners
11 months 2 weeks ago - 11 months 2 weeks ago #189562 by DenisChenu
Do not confuse L.D.A.P authentication and import of participants by LDAP .

For a sample of L.D.A.P activated , see YunoHost-Apps/limesurvey_ynh :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
Last edit: 11 months 2 weeks ago by DenisChenu. Reason: LDAP to L.D.A.P to disable autolink …
The following user(s) said Thank You: franciscohosting

Please Log in to join the conversation.

11 months 2 weeks ago #189620 by franciscohosting
Thanks Denis! that's exactly what I needed,

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now