Panic, user authenticated but no user data..

Moderator: crythias

Post Reply
parvezkhp
Znuny newbie
Posts: 30
Joined: 23 Jan 2018, 09:12
Znuny Version: 6.0.3

Panic, user authenticated but no user data..

Post by parvezkhp »

Dear Sir,

I am working on OTRS integration with AD. I did some changes in Config.pm file. I am able to login with customer are but I am unable to login with agent, getting error " Panic, user authenticated but no user data can be found in OTRS DB"

Can you please help me out on above error. I am sharing my config.pm below.

Regards.
Parvez

=========================================================
#Enable LDAP authentication for Customers / Users
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'WIN-V6POLTPOLFT.geek.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=OTRS Users,dc=geek,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'mail';

#The following is valid but would only be necessary if the
#anonymous user do NOT have permission to read from the LDAP tree
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'Tom@geek.com';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'Pass@123';

#CustomerUser
#(customer user database backend and settings)
$Self->{CustomerUser} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'WIN-V6POLTPOLFT.geek.com',
BaseDN => 'OU=OTRS Users,DC=geek,DC=com',
SSCOPE => 'sub',
UserDN =>'Tom@geek.com',
UserPw => 'Pass@123',
},
# customer unique id
CustomerKey => 'mail',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};

#Enable LDAP authentication for Customers / Users
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'WIN-V6POLTPOLFT.geek.com';
$Self->{'AuthModule::LDAP::BaseDN'} = 'ou=OTRS Users,dc=geek,dc=com';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';

#The following is valid but would only be necessary if the
#anonymous user do NOT have permission to read from the LDAP tree
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=Tom,OU=OTRS Users,DC=geek,DC=com';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'Pass@123';

# Check if the user is allowed to auth in a posixGroup
# (e. g. user needs to be in a group OTRS_Agents to use otrs)
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=Otrsldap,OU=OTRS Users,DC=geek,DC=com';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';


# Now sync data with OTRS DB
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'WIN-V6POLTPOLFT.geek.com';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'ou=OTRS Users,dc=geek,dc=com';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=Tom,OU=OTRS Users,DC=geek,DC=com';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Pass@123';

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

# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent
# login)
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
'users',
];


# UserTable
$Self->{DatabaseUserTable} = 'users';
$Self->{DatabaseUserTableUserID} = 'id';
$Self->{DatabaseUserTableUserPW} = 'pw';
$Self->{DatabaseUserTableUser} = 'login';
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Panic, user authenticated but no user data..

Post by wurzel »

Hi,

you could try to change

Code: Select all

  $Self->{'Customer::AuthModule::LDAP::UID'} = 'mail';
... and everywhere you use UID

usually it is

Code: Select all

SamAccountName 
on a Windows based AD. You should use it in mapping, too.

Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Post Reply