Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: ldap)

  • DenisChenu
  • DenisChenu's Avatar
13 Jan 2025 12:41
Replied by DenisChenu on topic AuthLDAP : Error 500 - false given
No idea :(
  • maes_lime
  • maes_lime's Avatar
10 Jan 2025 09:59
Replied by maes_lime on topic AuthLDAP : Error 500 - false given
Hi again,

Nothing change when I setup : LDAP attribute of email address and LDAP attribute of full name

Thanks for your help
  • DenisChenu
  • DenisChenu's Avatar
10 Jan 2025 09:13
Replied by DenisChenu on topic AuthLDAP : Error 500 - false given
Goit it : github.com/LimeSurvey/LimeSurvey/blob/aa...AP/AuthLDAP.php#L267

Your ldap_search return false, connection is OK .
Maybe need to fill  LDAP attribute of full name and  LDAP attribute of email address : if yes : we must set as mandatory on Plugin.
  • maes_lime
  • maes_lime's Avatar
10 Jan 2025 09:06
Replied by maes_lime on topic AuthLDAP : Error 500 - false given
Hi,

Thank's for your answer, here the result in debug mode:

PHP warning
ldap_search(): Search: No such object

/var/www/html/application/core/plugins/AuthLDAP/AuthLDAP.php(524)

512                 ldap_close($ldapconn); // all done? close connection
513                 return;
514             }
515             // Now prepare the search fitler
516             if ($extrauserfilter != "") {
517                 $usersearchfilter = "(&$searchuserattribute=$username)$extrauserfilter)";
518             } else {
519                 $usersearchfilter = "($searchuserattribute=$username)";
520             }
521             // Search for the user
522             $userentry = false;
523             foreach (explode(";", $usersearchbase) as $usb) {
524                 $dnsearchres = ldap_search($ldapconn, $usb, $usersearchfilter, array($searchuserattribute));
525                 $rescount = ldap_count_entries($ldapconn, $dnsearchres);
526                 if ($rescount == 1) {
527                     $userentry = ldap_get_entries($ldapconn, $dnsearchres);
528                     $userdn = $userentry[0]["dn"];
529                 }
530             }
531             if (!$userentry) {
532                 // if no entry or more than one entry returned
533                 // then deny authentication
534                 $this->setAuthFailure(self::ERROR_USERNAME_INVALID);
535                 ldap_close($ldapconn); // all done? close connection
536                 return;
Stack Trace
#0    
–  /var/www/html/application/core/plugins/AuthLDAP/AuthLDAP.php(524): ldap_search(LDAP\Connection, "CN=LIMESURVEY,CN=APPLICATIONS,CN=GROUPES,CN=SUBLOCAL,DC=DOMAINE,DC=fr", "(sAMAccountName=formation01)", array("sAMAccountName"))
519                 $usersearchfilter = "($searchuserattribute=$username)";
520             }
521             // Search for the user
522             $userentry = false;
523             foreach (explode(";", $usersearchbase) as $usb) {
524                 $dnsearchres = ldap_search($ldapconn, $usb, $usersearchfilter, array($searchuserattribute));
525                 $rescount = ldap_count_entries($ldapconn, $dnsearchres);
526                 if ($rescount == 1) {
527                     $userentry = ldap_get_entries($ldapconn, $dnsearchres);
528                     $userdn = $userentry[0]["dn"];
529                 }
#1    
 unknown(0): AuthLDAP->newUserSession()
#2    
–  /var/www/html/application/libraries/PluginManager/PluginManager.php(269): call_user_func(array(AuthLDAP, "newUserSession"))
264                 if (
265                     !$event->isStopped()
266                     && (empty($target) || in_array(get_class($subscription[0]), $target))
267                 ) {
268                     $subscription[0]->setEvent($event);
269                     call_user_func($subscription);
270                 }
271             }
272         }
273
274         return $event;
#3    
–  /var/www/html/application/core/LSUserIdentity.php(72): LimeSurvey\PluginManager\PluginManager->dispatchEvent(LimeSurvey\PluginManager\PluginEvent)
67                 $result->setError(self::ERROR_UNKNOWN_HANDLER);
68             } else {
69                 // Delegate actual authentication to plugin
70                 $authEvent = new PluginEvent('newUserSession', $this); // TODO: rename the plugin function authenticate()
71                 $authEvent->set('identity', $this);
72                 App()->getPluginManager()->dispatchEvent($authEvent);
73                 $pluginResult = $authEvent->get('result');
74                 if ($pluginResult instanceof LSAuthResult) {
75                     $result = $pluginResult;
76                 } else {
77                     $result->setError(self::ERROR_UNKNOWN_IDENTITY);

I check php ldap module is enbable on the docker.
  • DenisChenu
  • DenisChenu's Avatar
09 Jan 2025 10:37
Replied by DenisChenu on topic AuthLDAP : Error 500 - false given
PS : you can report an issue about error not managed : community.limesurvey.org/bug-tracker/

If connection are not done: we must try to show error and don't go to ldap_count_entries
  • DenisChenu
  • DenisChenu's Avatar
09 Jan 2025 10:35
Replied by DenisChenu on topic AuthLDAP : Error 500 - false given
> 500 : Internal server error - ldap count_entries(): Argument #2 ($result) must be of type LDAP\Result, false given

Then connection are not done … but you don't have error

Can you activate debug mode manual.limesurvey.org/Debug_mode
  • maes_lime
  • maes_lime's Avatar
09 Jan 2025 10:24
AuthLDAP : Error 500 - false given was created by maes_lime
Hi every one,

I'm trying to setup AuthLDAP module, but every time login look to success I have this error :
500 : Internal server error - ldap count_entries(): Argument #2 ($result) must be of type LDAP\Result, false given

My installation is a docker one (acspri/limesurvey) on the last limesurvey version.
My AuthLDAP setup is :

LDAP server: 
ldap://ad.local
Port number: 
389
LDAP version: 
LDAPv3
Enable Start-TLS: 
False
Select how to perform authentication.: 
Bind
Attribute to compare to the given login can be uid, cn, mail, ..: 
mail
Base DN for the user search operation. Multiple bases may be separated by a semicolon (;)
CN=LIMESURVEY,CN=APPLICATIONS,CN=GROUPES,CN=SUBLOCAL,DC=DOMAINE,DC=fr
Optional extra LDAP filter to be ANDed to the basic (searchuserattribute=username) filter. Don't forget the outmost enclosing parentheses: 
None
LDAP attribute of email address
None
LDAP attribute of full name
None
Check to make default authentication method: 
Yes
Automatically create user if it exists in LDAP server: 
Yes
Grant survey creation permission to automatically created users: 
Yes
Optional base DN for group restriction: 
None
Optional filter for group restriction: 
None
Allow initial user to login via LDAP: 
Yes

Our ActiveDirectory server is a Samba4 one LDAP Auth works on other web apps.
Any idear ?

Regards
  • DenisChenu
  • DenisChenu's Avatar
02 Dec 2024 11:15
Replied by DenisChenu on topic Erreur 500 - Requête LDAP
Je regarde ça : mais à mon avis sur ce point 6.8.1 : github.com/LimeSurvey/LimeSurvey/blob/eb...min/Tokens.php#L2132

Tu peux remonter le bogue : www.php.net/manual/en/function.ldap-get-option.php#112593

Par contre depuis quand cela ne fonctionne plus ?
  • ccoupeau
  • ccoupeau's Avatar
02 Dec 2024 09:31
Replied by ccoupeau on topic Erreur 500 - Requête LDAP
Votre version de LimeSurvey : 6.8.1 (env de Test) et 6.6.8 (env de Production)
  • DenisChenu
  • DenisChenu's Avatar
02 Dec 2024 09:07
Replied by DenisChenu on topic Erreur 500 - Requête LDAP
Il faudrait envoyer la page complète du mode debug (Sous firefox : Fichier/enregistrer sous)
Pour la poser ici : tu peux la zipper

Sinon : mise à jour récente de LimeSurvey ?
  • ccoupeau
  • ccoupeau's Avatar
02 Dec 2024 09:02
Erreur 500 - Requête LDAP was created by ccoupeau
Aidez-nous à vous aider et remplissez les cases appropriées :
Votre version de LimeSurvey : 6.8.1 et 6.6.8
Votre propre serveur ou LimeSurvey Cloud : Hébergement local
Thème : 

==================

Bonjour,


Un dysfonctionnement récent sur la création d'invitation depuis les requêtes LDAP est apparu avec ce sympathique message : 500 : Erreur interne au serveur - ldap_set_option(): supplied argument is not a valid ldap link resourceC'est une fonctionnalité que nous utilisons depuis des années sans problèmes.
Aucune modification de configuration en interne sur le serveur LDAP qui pourrait explique le problème d'autant plus que j'utilise les même valeurs dans l'extension AuthLDAP et c'est ok.

Le mode DEBUG renvoi ces informations : 

application/controllers/admin/Tokens.php(2132)
$sErrorMessage = ldap_error($ds);
define("LDAP_OPT_DIAGNOSTIC_MESSAGE", 0x0032);
if (ldap_get_option($ds, LDAP_OPT_DIAGNOSTIC_MESSAGE, $extended_error)) {
$sErrorMessage .= ' - ' . $extended_error;
}



 
  • melisa.kurtt
  • melisa.kurtt's Avatar
31 Oct 2024 13:49 - 31 Oct 2024 13:57
Replied by melisa.kurtt on topic Authentication Not Working
Hi,
There are 3 plugins available in my settings: Authdb, AuthLDAP and Authwebserver. Authdb is active and the other two is passive in my situation. Which one do I need to activate or change its status to passive in order for my site to run properly? Because yes I can make it direct to authentication somehow, but I can't login. That's the main problem, it gives 504 Gateway Timeout error.
  • DenisChenu
  • DenisChenu's Avatar
09 Oct 2024 15:13
Replied by DenisChenu on topic Problems with LDAP conection

Is it needed any previous step before being able to access with a LDAP user (like also creating the user in LimeSurvey,....)?

 
You have an option in AuthLDAP to auto create user on demand (or no).
I think it's no by default.
  • paochoa
  • paochoa's Avatar
08 Oct 2024 11:47
Problems with LDAP conection was created by paochoa
LimeSurvey version: 6.6.5
Own server or LimeSurvey Cloud: Own server
Survey theme/template:
==================
Hello, 
I have deployed LimeSurvey using the following docker image created by martialblog: martialblog/limesurvey:6-apache
I am using PostgreSQL instead of MySQL as DB.
Using the  AuthLDAP  plugin, I am trying to allow the users created in the app I use for that purpose ( FreeIPA ). Apparently the configuration is not correct, as when I try to access with the credentials of the users created in FreeIPA I keep getting an "Invalid credentials" message although they are correct.
My queries are:
Is it needed any previous step before being able to access with a LDAP user (like also creating the user in LimeSurvey,....)?
Where can I find the respective logs in the LimeSurvey container to obtain deeper insight and therefore try to solve the problem?

Thanks in advance.
 
  • DenisChenu
  • DenisChenu's Avatar
04 Oct 2024 09:41
Replied by DenisChenu on topic utiliser les informations de connexion ldap

je ne suis qu'utilisatrice, si j'ai bien compris je dois demander à l'admin de mettre à jour la config ?
 
Non, pas du tout.

Ce n'est pas inclus dans le cœur de LimeSurvey. Par chance, j'ai construit un plugin pour le faire.

Ce plugin est construit pour la version 5, il devrait être compatible avec la version 6. mais il faut l'adapater un peu.

Au besoin : fr.sondages.pro/contact.html
 
Displaying 16 - 30 out of 37 results.

Lime-years ahead

Online-surveys for every purse and purpose