Okay I am much closer thanks to your hints!
When adding the lines below it breaks Kernel/Config.pm do you see anything that is incorrect? This has been copied from my working version 4 OTRS. At first this worked for one or two page loads and then it just breaks whenever I add it back:
Code: Select all
## LDAP Config
####################################################
##
## LDAP configuration for the agent backend
##
####################################################
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'ldap.me.local';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=me,dc=com';
$Self->{'AuthModule::LDAP::UID'} = 'uid';
# 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->{'AuthModule::LDAP::GroupDN'} = 'cn=otrs-agent,ou=Groups,dc=cyc,dc=com';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
# for ldap posixGroups objectclass (just uid)
$Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
# This is where we sync the agent info with the OTRS backend
$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'}='ldap.me.local';
$Self->{'Customer::AuthModule::LDAP:BaseDN'}='ou=People,dc=me,dc=com';
$Self->{'Customer::AuthModule::LDAP:UID'}='uid';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
UserFirstname => 'givenName',
UserLastname => 'sn',
# UserEmail => 'mail',
};
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
'users',
];
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'}='ldap.me.local';
$Self->{'Customer::AuthModule::LDAP:BaseDN'}='ou=People,dc=me,dc=com';
$Self->{'Customer::AuthModule::LDAP:UID'}='uid';
# ldap database connection
$Self->{'CustomerUser'} = {
Name => 'LDAP Customer Data',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'ldap.me.local',
BaseDN => 'ou=People,dc=me,dc=com',
SSCOPE => 'sub',
AlwaysFilter => '',
},
CustomerKey => 'uid',
CustomerID => 'uid',
CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['cn', 'mail'],
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
CustomerUserExcludePrimaryCustomerID => 0,
AdminSetPreferences => 0,
Map => [
['UserFirstname','Firstname','givenname',1,1,'var','',0],
['UserLastname','Lastname','sn',1,1,'var','',0],
['UserLogin','Username','uid',1,1,'var','',0],
['UserEmail','Email','mail',1,1,'var','',0],
['UserCustomerID','CustomerID','mail',0,1,'var','',0],
],
};
My apache error log is:
Code: Select all
[Tue Apr 25 14:48:49.534100 2017] [perl:error] [pid 1773:tid 139982639392512] [client 10.1.3.105:63072] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://otrs2.cyc.local/otrs/index.pl
[Tue Apr 25 14:48:50 2017] -e: Kernel::Config could not be loaded: Attempt to reload Kernel/Config.pm aborted.
[Tue Apr 25 14:48:50 2017] -e: Compilation failed in require at /opt/otrs/Kernel/System/ObjectManager.pm line 191.
[Tue Apr 25 14:48:50 2017] -e: at /opt/otrs/Kernel/System/Web/InterfaceAgent.pm line 80.
[Tue Apr 25 14:48:50.794797 2017] [:error] [pid 1772:tid 139982723319552] Kernel::Config could not be loaded: Attempt to reload Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/System/ObjectManager.pm line 191.\n at /opt/otrs/Kernel/System/ObjectManager.pm line 541.\n\tKernel::System::ObjectManager::_DieWithError(Kernel::System::ObjectManager=HASH(0x7f503818c080), "Error", "Kernel::Config could not be loaded: Attempt to reload Kernel/"...) called at /opt/otrs/Kernel/System/ObjectManager.pm line 200\n\tKernel::System::ObjectManager::_ObjectBuild(Kernel::System::ObjectManager=HASH(0x7f503818c080), "Package", "Kernel::Config") called at /opt/otrs/Kernel/System/ObjectManager.pm line 180\n\tKernel::System::ObjectManager::Get(Kernel::System::ObjectManager=HASH(0x7f503818c080), "Kernel::Config") called at /opt/otrs/Kernel/System/Web/InterfaceAgent.pm line 80\n\tKernel::System::Web::InterfaceAgent::new("Kernel::System::Web::InterfaceAgent", "Debug", 0) called at /opt/otrs/bin/cgi-bin/index.pl line 39\n\tModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler(Apache2::RequestRec=SCALAR(0x7f502d698e10)) called at /usr/lib/x86_64-linux-gnu/perl5/5.22/ModPerl/RegistryCooker.pm line 207\n\teval {...} called at /usr/lib/x86_64-linux-gnu/perl5/5.22/ModPerl/RegistryCooker.pm line 207\n\tModPerl::RegistryCooker::run(ModPerl::Registry=HASH(0x7f503929a568)) called at /usr/lib/x86_64-linux-gnu/perl5/5.22/ModPerl/RegistryCooker.pm line 173\n\tModPerl::RegistryCooker::default_handler(ModPerl::Registry=HASH(0x7f503929a568)) called at /usr/lib/x86_64-linux-gnu/perl5/5.22/ModPerl/Registry.pm line 32\n\tModPerl::Registry::handler("ModPerl::Registry", Apache2::RequestRec=SCALAR(0x7f502d698e10)) called at -e line 0\n\teval {...} called at -e line 0\n
I can remove the LDAP snippet and the server will work correctly.