Panic! No UserData for user:

Moderator: crythias

Locked
sameer666
Znuny newbie
Posts: 12
Joined: 16 Feb 2012, 06:40
Znuny Version: 3.1
Real Name: sameer

Panic! No UserData for user:

Post by sameer666 »

hey ppl

i keep getting this notification in systemlog. i am using LDAP for my customer authentication and information. i can authenticate customers and get customer information but keep getting this error. i am using otrs 3.0.11.

Code: Select all

 Panic! No UserData for user: 
as far as i know the backend DB have to sync but for somewhat reason i dont know what is wrong with it. if some one can pleas help me out.

thanks

Code: Select all

	# (make sure Net::LDAP is installed!)
			$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
			$Self->{'Customer::AuthModule::LDAP::Host'} = 'xxxxx.xxxxx.net';
			$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'OU=PEOPLE,dc=xxxxx,dc=NET';
			$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';

		# Check if the user is allowed to auth in a posixGroup
		# (e. g. user needs to be in a group xyz to use otrs)
			#$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com';
			#$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';

		# for ldap posixGroups objectclass (just uid)
			#$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';

		# for non ldap posixGroups objectclass (full user dn)
		#$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN';

		# The following is valid but would only be necessary if the
		# anonymous user does NOT have permission to read from the LDAP tree
			$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'username';
			$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'secretpassword';

		# in case you want to add always one filter to each ldap query, use
		# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
			$Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '';

		# in case you want to add a suffix to each customer login name, then
		# you can use this option. e. g. user just want to use user but
		# in your ldap directory exists user@domain.
		#$Self->{'Customer::AuthModule::LDAP::UserSuffix'} = '@domain.com';

		# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
			$Self->{'Customer::AuthModule::LDAP::Params'} = {
    				port => 389,
    				timeout => 120,
    				async => 0,
    				version => 3,
			};












# (customer ldap backend and settings)
$Self->{CheckMXRecord} = 0;
$Self->{CustomerUser} = {
    Name => 'LDAP Data Source',
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
        # ldap host
        Host => 'xxxxx.xxxxx.net',
        # ldap base dn
        BaseDN => 'OU=PEOPLE,dc=xxxxx,dc=NET',
	#UID
	#UID => 'sAMAccountName',
        # search scope (one|sub)
        SSCOPE => 'sub',
        # The following is valid but would only be necessary if the
        # anonymous user does NOT have permission to read from the LDAP tree
        UserDN => 'username',
        UserPw => 'secretpassword',
        # in case you want to add always one filter to each ldap query, use
        # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
        AlwaysFilter => '',
            # if both your frontend and your LDAP are unicode, use this:
            SourceCharset => 'utf-8',
            DestCharset   => 'utf-8',
            # if your frontend is unicode and the charset of your
            # ldap server is iso-8859-1, use these options.
            # SourceCharset => 'iso-8859-1',
            # DestCharset => 'utf-8',
            # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
            Params => {
                port => 389,
                timeout => 120,
                async => 0,
                version => 3,
            },
    },
    # customer unique id
    CustomerKey => 'sAMAccountName',
    # customer #
    CustomerID => 'mail',
    CustomerUserListFields => ['cn','mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail','description'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 5000,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    # show not own tickets in customer panel, CompanyTickets
    CustomerUserExcludePrimaryCustomerID => 0,
    # add an ldap filter for valid users (expert setting)
#    CustomerUserValidFilter => '(!(description=locked))',
    # administrator can't change customer preferences
    AdminSetPreferences => 0,
#    # cache time to live in sec. - cache any database queries
    CacheTTL => 0,
    Map => [
        # note: Login, Email and CustomerID are mandatory!
        # var,              frontend,      storage,          shown (1=always,2=lite), required, storage-type, http-link, readonly
        [ 'UserTitle',      'Title',      'title',           1,                          0,        'var',        '',        0 ],
        [ 'UserFirstname',  'Firstname',  'givenname',       1,                          1,        'var',        '',        0 ],
        [ 'UserLastname',   'Lastname',   'sn',              1,                          1,        'var',        '',        0 ],
        [ 'UserLogin',      'Username',   'sAMAccountName',  1,                          1,        'var',        '',        0 ],
        [ 'UserEmail',      'Email',      'mail',            1,                          1,        'var',        '',        0 ],
        [ 'UserCustomerID', 'CustomerID', 'mail',            0,                          1,        'var',        '',        0 ],
#        [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
        [ 'UserPhone',      'Phone',      'telephonenumber', 1,                          0,        'var',        '',        0 ],
        [ 'UserAddress',    'Address',    'postaladdress',   1,                          0,        'var',        '',        0 ],
        [ 'UserComment',    'Comment',    'description',     1,                          0,        'var',        '',        0 ],
    ],
};
sameer666
Znuny newbie
Posts: 12
Joined: 16 Feb 2012, 06:40
Znuny Version: 3.1
Real Name: sameer

Re: Panic! No UserData for user:

Post by sameer666 »

to my investigation if i have customer in agent table i don't see this error. what i am getting is otrs is not able to differentiate between customer and user if using ldap ?
sameer666
Znuny newbie
Posts: 12
Joined: 16 Feb 2012, 06:40
Znuny Version: 3.1
Real Name: sameer

Re: Panic! No UserData for user:

Post by sameer666 »

bump
sameer666
Znuny newbie
Posts: 12
Joined: 16 Feb 2012, 06:40
Znuny Version: 3.1
Real Name: sameer

Re: Panic! No UserData for user:

Post by sameer666 »

narrowed it down to, that i have installed KIX4OTRS so i guess that is what is causing that error. can any one please help me with it



thanks
eckart
Znuny newbie
Posts: 3
Joined: 31 Jan 2012, 10:16
Znuny Version: 3.0
Real Name: Kai
Company: VATGER

Re: Panic! No UserData for user:

Post by eckart »

Dont know if OTRS 3.0.11 is using the same vars as 3.1.1
but in 3.1.1 i have to use this line

Code: Select all

$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';
Without it i get the 'Panic, no user data found' message
sameer666
Znuny newbie
Posts: 12
Joined: 16 Feb 2012, 06:40
Znuny Version: 3.1
Real Name: sameer

Re: Panic! No UserData for user:

Post by sameer666 »

thanks for replying. are you using kix4otrs modules too ?

Tried it but still am getting the error :(.
sameer666
Znuny newbie
Posts: 12
Joined: 16 Feb 2012, 06:40
Znuny Version: 3.1
Real Name: sameer

Re: Panic! No UserData for user:

Post by sameer666 »

HTH :D

--- OutputFilterSwitchButton.pm 2012-02-26 14:12:15.637980097 +0300
+++ OutputFilterSwitchButton.pm.new 2012-02-26 14:13:21.386434395 +0300
@@ -107,8 +107,8 @@
my $Groups = $SwitchButtonReg->{Group} || '';

#-----------------------------------------------------------------------
- # check or agent users...
- if ( $Self->{UserType} eq 'User' ) {
+ # check or agent users... THE FUNCTION IS FOR CUSTOMER
+ if ( $Self->{UserType} eq 'Customer' ) {

# 1: check for valid customer account...
my %CustomerData = $Self->{CustomerUserObject}->CustomerUserDataGet(
@@ -142,8 +142,8 @@
}

#-----------------------------------------------------------------------
- # check for customer users...
- elsif ( $Self->{UserType} eq 'Customer' ) {
+ # check for customer users... THE FUNCTION IS FOR AGENT
+ elsif ( $Self->{UserType} eq 'User' ) {

# 1: check for valid agent user account...
my %AgentData =
Locked