[SOLVED]Panic, user authenticated but no user data..

Moderator: crythias

Post Reply
kool_kid
Znuny newbie
Posts: 86
Joined: 13 Feb 2011, 13:51
Znuny Version: 3

[SOLVED]Panic, user authenticated but no user data..

Post by kool_kid »

Hi,

My LDAP integration with customers back end went successfully. Even I'm able to login my agents using LDAP authentication. The problem I'm facing is that OTRS is not adding new agents through LDAP Sync.

I may be wrong, but what I'm assuming is that once otrs is able to authenticate the agent using ldap, it will create a user in OTRS DB automatically. I'm receiving this error when trying to login with a proper ldap user which is not there in OTRS DB.

Code: Select all

Panic, user authenticated but no user data can be found in OTRS DB!! 


My Logs publish these errors

Code: Select all

Need User Email

Code: Select all

Can't create user 'otrs_test' (CN=otrs test,OU=IT Test,OU=Department,OU=OU_OU1,DC=domain,DC=com) in RDBMS 

Code: Select all

No user ID found for otrs_test
If I create a user in otrs db with same ldap username then I'm able to login. But cant this creation of users be done automatically in otrs DB??


Here is my agents code

Code: Select all

  $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
  $Self->{'AuthModule::LDAP::Host'} = 'host.domain.com';
  $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=com';
  $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
 
  $Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=Ldap User,cn=users,dc=domain,dc=com';
  $Self->{'AuthModule::LDAP::SearchUserPw'} = 'somepass';
 $Self->{'AuthModule::LDAP::AlwaysFilter'} = '';
$Self->{'AuthModule::LDAP::Params'} = {
    port => 389,
    timeout => 120,
    async => 0,
    version => 3,
};

$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'host.domain.com';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain, dc=com';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
$Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'cn=Ldap User,cn=users,dc=domain,dc=com';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'somepass';


  $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {  
        UserFirstname => 'givenName',
        UserLastname => 'sn',
        UserEmail => 'mail',
    };

    $Self->{UserSyncLDAPGroups} = ['users',];

    $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = ['users',];
    

    $Self->{DatabaseUserTable} = 'users';
    $Self->{DatabaseUserTableUserID} = 'id';
    $Self->{DatabaseUserTableUserPW} = 'pw';
    $Self->{DatabaseUserTableUser} = 'login';

  $Self->{'AuthModule::LDAP::GroupDN'} ='cn=Agents,OU=AgentsAccounts,dc=domain,dc=com';
 $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
 $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

  
Last edited by kool_kid on 20 Feb 2011, 22:41, edited 1 time in total.
OTRS 3.1.10
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Panic, user authenticated but no user data can be found

Post by crythias »

I believe that agents may need to be added once manually.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Panic, user authenticated but no user data can be found

Post by jojo »

please show the Log entries
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kool_kid
Znuny newbie
Posts: 86
Joined: 13 Feb 2011, 13:51
Znuny Version: 3

Re: Panic, user authenticated but no user data can be found

Post by kool_kid »

Now I added my agents login via add agents interface in admin control panel. Agents are able to login but the question remains.

I was said that the below code will restrict the users from Agents group to login via agent interface.

Code: Select all

  $Self->{'AuthModule::LDAP::GroupDN'} ='cn=Agents,OU=AgentsAccounts,dc=domain,dc=com';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
What's the point of doing this when we have to add the agents manually? Supposing this code is not part of my config.pm and some member of my Active Directory tries to login via agent interface, anyway the login will not be successful becuz the user doesnt exist in OTRS db. Then why add the above code?



Regards
Kk
OTRS 3.1.10
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Panic, user authenticated but no user data can be found

Post by jojo »

Agents can be synced on first login, so there is no need for manual creating them in database. So please show the log...
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kool_kid
Znuny newbie
Posts: 86
Joined: 13 Feb 2011, 13:51
Znuny Version: 3

Re: Panic, user authenticated but no user data can be found

Post by kool_kid »

Thanks for the reply.

My first post contains the log entries, let me know if you looking for something more.

Regards
Kk
OTRS 3.1.10
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Panic, user authenticated but no user data can be found

Post by jojo »

Your LDAP Data does not contain a mail address:
Need User Email
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kool_kid
Znuny newbie
Posts: 86
Joined: 13 Feb 2011, 13:51
Znuny Version: 3

Re: Panic, user authenticated but no user data can be found

Post by kool_kid »

All users in ldap do have email address. Is it that the ldap is not able to fetch the email address?

Also my customer back end is integrated and I can get email addresses through this.



Regards
Kk
OTRS 3.1.10
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Panic, user authenticated but no user data can be found

Post by jojo »

does the user otrs_test have a mail addrss in the LDAP field mail?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kool_kid
Znuny newbie
Posts: 86
Joined: 13 Feb 2011, 13:51
Znuny Version: 3

Re: Panic, user authenticated but no user data can be found

Post by kool_kid »

Yes, there was a missing email address. When I added the email address the login worked.

Thanks for the pointer.
OTRS 3.1.10
cinderellaxd
Znuny newbie
Posts: 2
Joined: 20 Aug 2019, 18:52
Znuny Version: 3.3
Real Name: Cindy Sc
Company: Finanzas

Re: [SOLVED]Panic, user authenticated but no user data..

Post by cinderellaxd »

In my case, the agents login through LDAP and this message appears when an agent is in an "invalid" state.
Go to the Admin menu -> Agents -> go to the agent detail and change the status.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [SOLVED]Panic, user authenticated but no user data..

Post by root »

cinderellaxd wrote: 24 Sep 2019, 19:49 In my case, the agents login through LDAP and this message appears when an agent is in an "invalid" state.
Go to the Admin menu -> Agents -> go to the agent detail and change the status.
Both are correct, but why answer to an 8 years old post?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
cinderellaxd
Znuny newbie
Posts: 2
Joined: 20 Aug 2019, 18:52
Znuny Version: 3.3
Real Name: Cindy Sc
Company: Finanzas

Re: [SOLVED]Panic, user authenticated but no user data..

Post by cinderellaxd »

root wrote: 24 Sep 2019, 20:27
cinderellaxd wrote: 24 Sep 2019, 19:49 In my case, the agents login through LDAP and this message appears when an agent is in an "invalid" state.
Go to the Admin menu -> Agents -> go to the agent detail and change the status.
Both are correct, but why answer to an 8 years old post?

- Roy
I just signed up for this forum, maybe it can serve someone and there is no other similar response.
Post Reply