I have tried to follow many guides to achieve customer login via LDAP but to no avail.
If I configure the settings solely in from within sysConfig, I get the error message: 'Authentication succeeded, but no customer record is found in the customer backend. Please contact your administrator.'
So after googling this I found some more guides. but never got past this point.
I also found that you can configure more than one back end authentication protocol (so I have attempted this as well to also include the DB just in case.
Here is my zzzAuto.pm:
Code: Select all
# OTRS config file (automatically generated)
# VERSION:1.1
package Kernel::Config::Files::ZZZAuto;
use strict;
use warnings;
use utf8;
sub Load {
my ($File, $Self) = @_;
$Self->{'CustomerPanelBodyNewAccount'} = 'Hi <OTRS_USERFIRSTNAME>,
You or someone impersonating you has created a new OTRS account for
you.
Full name: <OTRS_USERFIRSTNAME> <OTRS_USERLASTNAME>
User name: <OTRS_USERLOGIN>
Password : <OTRS_USERPASSWORD>
You can log in via the following URL. We encourage you to change your password
via the Preferences button after logging in.
<OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl';
$Self->{'CustomerPanelBodyLostPassword'} = 'Hi <OTRS_USERFIRSTNAME>,
New password: <OTRS_NEWPW>
<OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl';
$Self->{'CustomerPanelBodyLostPasswordToken'} = 'Hi <OTRS_USERFIRSTNAME>,
You or someone impersonating you has requested to change your OTRS
password.
If you want to do this, click on this link. You will receive another email containing the password.
<OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl?Action=CustomerLostPassword;Token=<OTRS_TOKEN>
If you did not request a new password, please ignore this email.';
delete $Self->{'PreferencesGroups'}->{'SpellDict'};
$Self->{'SendmailModule::Port'} = '25';
$Self->{'SendmailModule::Host'} = '192.168.16.241';
$Self->{'SendmailModule'} = 'Kernel::System::Email::SMTP';
$Self->{'LogModule::LogFile'} = 'C:/PROGRA~2/OTRS/OTRS/var/log/otrs.log';
$Self->{'LogModule'} = 'Kernel::System::Log::File';
$Self->{'CustomerHeadline'} = 'CME Medical Helpdesk';
$Self->{'DefaultLanguage'} = 'en_GB';
$Self->{'Organization'} = 'CME Medical';
$Self->{'AdminEmail'} = 'swatson@cmemedical.co.uk';
$Self->{'FQDN'} = 'cme-mckinley.local';
$Self->{'SecureMode'} = 1;
}
1;
Code: Select all
# This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{AuthModule1} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host1'} = '192.168.16.240';
$Self->{'AuthModule::LDAP::BaseDN1'} = 'dc=domain,dc=local';
$Self->{'AuthModule::LDAP::UID1'} = 'sAMAccoutName';
# # 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::SearchUserDN1'} = 'cn=otrs_ldap,ou=service_accounts,ou=Users,ou=MyBusiness,dc=domain,dc=local';
$Self->{'AuthModule::LDAP::SearchUserPw1'} = 'password';
# # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params1'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
# Die if backend can't work, e. g. can't connect to server.
$Self->{'AuthModule::LDAP::Die'} = 1;
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
# --------------------------------------------------- #
# authentication sync settings #
# (enable agent data sync. after succsessful #
# authentication) #
# --------------------------------------------------- #
# This is an example configuration for an LDAP auth sync. backend.
# (take care that Net::LDAP is installed!)
$Self->{'AuthSyncModule1'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host1'} = '192.168.16.240';
$Self->{'AuthSyncModule::LDAP::BaseDN1'} = 'dc=domain,dc=local';
$Self->{'AuthSyncModule::LDAP::UID1'} = '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->{'AuthSyncModule::LDAP::SearchUserDN1'} = 'cn=otrs_ldap,ou=service_accounts,ou=Users,ou=MyBusiness,dc=domain,dc=local';
$Self->{'AuthSyncModule::LDAP::SearchUserPw1'} = 'password';
# AuthSyncModule::LDAP::UserSyncMap
# (map if agent should create/synced from LDAP to DB after successful login)
$Self->{'AuthSyncModule::LDAP::UserSyncMap1'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups1'} = [
'users',
];
# In case you need to use OTRS in iso-charset, you can define this
# by using this option (converts utf-8 data from LDAP to iso).
# $Self->{'AuthSyncModule::LDAP::Charset'} = 'iso-8859-1';
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
# $Self->{'AuthSyncModule::LDAP::Params'} = {
# port => 389,
# timeout => 120,
# async => 0,
# version => 3,
# };
# Die if backend can't work, e. g. can't connect to server.
# $Self->{'AuthSyncModule::LDAP::Die'} = 1;
If anyone can point me in the right direction I would appreciate it