Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

LDAP configuration not working

  • franciscohosting
  • franciscohosting's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #189556 by franciscohosting
LDAP configuration not working was created 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:
Code:
<?php if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
|   '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',
  ),
    ),
 
        'publicurl'=>'',
  'debug'=>0, 
        'debugsql'=>0, // Set this to 1 to enable sql logging, only active when debug = 2
 
  'tempurl'=>'https://some.page/limesurvey/tmp',
  'homeurl'=>'https://some.page/limesurvey/admin',
  'uploadurl'=>'https://some.page/limesurvey/upload',
  'publicurl'=>'https://some.page/limesurvey',
  'imagefiles'=>'https://some.page/limesurvey/admin/images',
  'enableLdap'=>true,
    )
);
/* 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:
Code:
<?php
$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'] = '(&amp;(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!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago - 4 years 6 months ago #189562 by DenisChenu
Replied by DenisChenu on topic LDAP configuration not working
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: 4 years 6 months ago by DenisChenu. Reason: LDAP to L.D.A.P to disable autolink …
The following user(s) said Thank You: franciscohosting
The topic has been locked.
  • franciscohosting
  • franciscohosting's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #189620 by franciscohosting
Replied by franciscohosting on topic LDAP configuration not working
Thanks Denis! that's exactly what I needed,
greetings!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose