Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] Login erro...
 
Notifications
Clear all

[SOLVED] Login error for user

5 Posts
2 Users
0 Reactions
9,751 Views
(@treddy_karra)
Posts: 5
Active Member
Topic starter
 
[#2615]

Hello,
I have an issue with LDAP configuration. I can't login with LDAP User. Please check the log and Global Parameters

Here's the log
===== TRACE ===== Login error for user

Global Parameters

connection with LDAP user: Yes
LDAP base dn : DC=MYDOMAIN,DC=com
LDAP host : My Domain Server IP Address
LDAP port : 389
LDAP version : 3
LDAP user : CN=FirstName LastName ,CN=Users,DC=My Domain,DC=com
LDAP password : Admin user password
LDAP user filter : userPrincipalName=%USERNAME% (tried with uid and sAMAccountName filters as well)
default profile for Ldap users : Project Members
message on creation new user from Ldap : Email

Thanks
Thirumal


 
Posted : 23 Sep 2015 23H06
babynus
(@babynus)
Posts: 14954
Main Contributor Admin
 

You mau be facing identified issue :
http://www.projeqtor.org/en/kunena-2/5-ask-questions/6539-solved-problem-ldap-search#10905
(fix is proposed in the post)


 
Posted : 23 Sep 2015 23H54
(@treddy_karra)
Posts: 5
Active Member
Topic starter
 

Quick fix (as a workaround) is to change line 2665 in /model/persistence/SqlElement.php from
if (getSessionUser()->id) {
to
if (1) {

I saw almost all the posts regarding LDAP issues and tried all the proposed solutions including this one but none of them worked for me.

I am not sure what else to check and posted the log here.

Thanks
Thirumal


 
Posted : 24 Sep 2015 0H36
babynus
(@babynus)
Posts: 14954
Main Contributor Admin
 

It seems your search filter is not correct : does not retrieve a user or returns several users

You can add debugLog() lines or traceLog() lines in /model/User->autheticate)( methode to chech used filter and exact issue.
Something like this (line 939)

			$result_user = ldap_get_entries($ldapCnx, $result);
			if ($result_user['count'] == 0) {
			  traceLog("authenticate - Filter error : ldap_search returned no result for filter $filter_r)" );
			  $this->unsuccessfullLogin();
				return "login";
			}
		  if ($result_user['count'] > 1) {
		    traceLog("authenticate - Filter error : ldap_search returned more than one result for filter $filter_r)" );
		    $this->unsuccessfullLogin();
        return "login";
      }
			$first_user = $result_user[0];
			$ldap_user_dn = $first_user['dn'];
      if (strtolower($ldap_user_dn)==strtolower($paramLdap_search_user)) {
      	traceLog("authenticate - Filter error : filter retrieved admin user (LDAP user in global parameters)" );
      	$this->unsuccessfullLogin();
      	return "login";
      } 

 
Posted : 24 Sep 2015 20H32
(@treddy_karra)
Posts: 5
Active Member
Topic starter
 

it worked with sAMAccountName again


 
Posted : 25 Sep 2015 23H13
Share:

Scroll to Top