No such user --> LDAP authentication

Moderator: crythias

Locked
m_pirker
Znuny newbie
Posts: 3
Joined: 05 Oct 2010, 17:06
Znuny Version: 2.4.8

No such user --> LDAP authentication

Post by m_pirker »

hello.

I have that issue with otrs 2.4.8.

I have configured LDAP authentication, the log is saying authentication ok, but I always get this error:
Wed Nov 10 18:31:25 2010 error OTRS-CGI-10 No such user 'Mario Pirker'!
Wed Nov 10 18:31:25 2010 notice OTRS-CGI-10 CustomerUser: Mario Pirker (CN=Mario Pirker,OU=AT,O=FELDER) authentication ok (REMOTE_ADDR: 192.168.210.107).

I have read nearly all other posts about that issue, but nothing of them could help me.
I would be very grateful if someone could help me to come further in that issue.

Thanks in advance


My Config.pm is:

$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = '172.16.103.75';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'o=FELDER';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'CN';

# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser} = {
Name => 'LDAP Datenquelle',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'ldap://172.16.103.75',
# ldap base dn
BaseDN => 'o=FELDER',
# 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 => "',
UserPw => ",

# 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 => '(objectclass=inetorgPerson)',
# if your frontend is e. g. iso-8859-1 and the charset of your
# ldap server is utf-8, use this options (if not, ignore it)
# SourceCharset => 'utf-8',
# DestCharset => 'iso-8859-1',

# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)

Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
ReadOnly => 1,
# customer uniq id
CustomerKey => 'uid',
# customer #
CustomerID => 'cn',
CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['cn', 'mail', 'postalCode'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
# show now own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',

# admin can't change customer preferences
AdminSetPreferences => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserSalutation', '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 ],
],


};

######## BACKEND KUNDEN AUTH ##########

######## BACKEND KUNDEN AUTH LDAPBACKEND SYNC ##########

# UserSyncLDAPMap
# (map if agent should create/synced from LDAP to DB after login)
$Self->{UserSyncLDAPMap} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};

# UserSyncLDAPGroups
# (If "LDAP" was selected for AuthModule, you can specify
# initial user groups for first login.)
$Self->{UserSyncLDAPGroups} = [
'users',
];

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


######## BACKEND KUNDEN AUTH LDAPBACKEND SYNC ##########
m_pirker
Znuny newbie
Posts: 3
Joined: 05 Oct 2010, 17:06
Znuny Version: 2.4.8

Re: No such user --> LDAP authentication

Post by m_pirker »

Can please someone help me??? I am some kind of desperated already :(
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: No such user --> LDAP authentication

Post by jojo »

The code you used is for versions < 2.4.

The Sync Part changed in 2.4, please have a look on your Defaults.pm
"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
m_pirker
Znuny newbie
Posts: 3
Joined: 05 Oct 2010, 17:06
Znuny Version: 2.4.8

Re: No such user --> LDAP authentication

Post by m_pirker »

thanks for your answer.

I am no able to log in as a normal person like a helpdesk worker via LDAP:
Nov 22 15:40:46 otrs OTRS-CGI-01[19402]: [Notice][Kernel::System::AuthSession::DB::RemoveSessionID] Removed SessionID 016458153339e8d55ae69c47953e255276.
Nov 22 15:40:50 otrs OTRS-CGI-01[19403]: [Notice][Kernel::System::Auth::LDAP::Auth] User: Mario Pirker (CN=Mario Pirker,OU=AT,O=FELDER) authentication ok (REMOTE_ADDR: 192.168.210.107).
Nov 22 15:40:50 otrs OTRS-CGI-01[19403]: [Notice][Kernel::System::User::UserUpdate] User: 'Mario Pirker' updated successfully (1)!
Nov 22 15:40:50 otrs OTRS-CGI-01[19403]: [Notice][Kernel::System::User::SetPassword] User: 'Mario Pirker' changed password successfully!

but when I try to login as a customer, it does not work:
Nov 22 15:15:36 otrs OTRS-CGI-01[19399]: [Notice][Kernel::System::CustomerAuth::LDAP::Auth] CustomerUser: Mario Pirker (CN=Mario Pirker,OU=AT,O=FELDER) authentication ok (REMOTE_ADDR: 192.168.210.107).
Nov 22 15:15:36 otrs OTRS-CGI-01[19399]: [Error][Kernel::System::CustomerUser::SetPreferences][Line:493]: No such user 'Mario Pirker'!


where do I have to configure that sync for the customers?

thank you very much in advance.

best regards
mario
Locked