wir nutzen OTRS aktuell mit LDAP Backend, was auch einwandfrei funktioniert.
Trozdem würden wir gerne das DB Backend mitbenutzen, was laut der Dokumentation auch möglich ist.
Wir haben genau wie es in der Doku beschrieben ist den "CustomerUser" in "CutomerUser1" umbenannt und das DB Backend als "CustomerUser2" eingefügt.
Die komplette DB Backend Konfiguration haben wir aus der Doku kopiert und 1:1 in die Config.pm eingefügt.
Beim Versuch Apache zu starten kommt folgender fehler in der error.log:
[Tue Jan 14 15:09:50 2014] [error] Can't modify constant item in scalar assignment at /opt/otrs//Kernel/Config.pm line 235, near "'login',"\nBEGIN not safe after errors--compilation aborted at /opt/otrs//Kernel/Config.pm line 308.\nCompilation failed in require at /opt/otrs/scripts/apache2-perl-startup.pl line 69.\nBEGIN failed--compilation aborted at /opt/otrs/scripts/apache2-perl-startup.pl line 69.\nCompilation failed in require at (eval 2) line 1.\n
Hier ist die Config.pm
Code: Select all
# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2012 xxx, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.27 2012/11/20 14:26:12 mh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
# Note:
#
# -->> OTRS does have a lot of config settings. For more settings
# (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
# LDAP, PostMaster, Session, Preferences, ...) see
# Kernel/Config/Defaults.pm and copy your wanted lines into "this"
# config file. This file will not be changed on update!
# --
package Kernel::Config;
use utf8;
sub Load {
my $Self = shift;
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# Start of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #
# DatabaseHost
# (The database host.)
$Self->{'DatabaseHost'} = 'localhost';
# Database
# (The database name.)
$Self->{'Database'} = 'otrs';
# DatabaseUser
# (The database user.)
$Self->{'DatabaseUser'} = 'otrs';
# DatabasePw
# (The password of database user. You also can use bin/otrs.CryptPassword.pl
# for crypted passwords.)
$Self->{'DatabasePw'} = 'xxxxxxx' ;
# DatabaseDSN
# (The database DSN for MySQL ==> more: "man DBD::mysql")
$Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = '/opt/otrs';
# ---------------------------------------------------- #
# insert your own config settings "here" #
# config settings taken from Kernel/Config/Defaults.pm #
# ---------------------------------------------------- #
# $Self->{SessionUseCookie} = 0;
# $Self->{CheckMXRecord} = 0;
# ---------------------------------------------------- #
# data inserted by installer #
# ---------------------------------------------------- #
# $DIBI$
# ---------------------------------------------------- #
##------------------------------------------------------------------------------------------------------------##
##------------------------------------------------------------------------------------------------------------##
## ##
## Anbindug der Agents und Customer an LDAP ##
## ##
##------------------------------------------------------------------------------------------------------------##
##------------------------------------------------------------------------------------------------------------##
#------------------------------------------------ LDAP Auth Agents -------------------------------------------#
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'dc1.firma.mannheim';
$Self->{'AuthModule::LDAP::BaseDN'} ='dc=firma,dc=mannheim';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
#---------------------------------------------- LDAP Auth Customers ------------------------------------------#
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'dc1.firma.mannheim';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=firma,dc=mannheim';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
#--------------------------------------------- SecurityGroup Agent --------------------------------------------#
$Self->{'AuthModule::LDAP::GroupDN'} = 'cn=otrsagents,ou=otrs,dc=firma,dc=mannheim';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
#--------------------------------------------SecurityGroup Customer -------------------------------------------#
$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrskunden,ou=otrs,dc=firma,dc=mannheim';
$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
#---------------------------------------------- SearchUser Agents ---------------------------------------------#
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'apache_user';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'xxxxxxxxx';
#--------------------------------------------- SearchUser Customer --------------------------------------------#
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'apache_user';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'xxxxxxxxxx';
#----------------------------------------------- Parameter Agents ---------------------------------------------#
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
#---------------------------------------------- Parameter Customer --------------------------------------------#
$Self->{'Customer::AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
################################################################################################################
#------------------------------------------ Customer Daten aus der AD ziehen ----------------------------------#
################################################################################################################
# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser1} = {
Name => 'LDAP Data Source',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'dc1.firma.mannheim',
# ldap base dn
BaseDN => 'OU=Users, DC=firma, DC=mannheim',
# search scope (one|sub)
SSCOPE => 'sub',
#---------------------------------------------- SearchUSer Customer LDAP ---------------------------------------#
UserDN => 'CN=apache_user, OU=Users, DC=firma, DC=mannheim',
UserPw => 'xxxxxxxx',
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 3268,
timeout => 120,
async => 0,
version => 3,
},
},
ReadOnly => 1,
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['cn', 'mail'],
CustomerUserSearchFields => ['cn', 'givenname', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
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 => 120,
Map => [
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ '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', 'company', 0, 1, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'homePhone', 1, 0, 'var', '', 0 ],
# [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Street', 'streetAddress', 1, 0, 'var', '', 0 ],
[ 'UserZip', 'Zip', 'postalCode', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'City', 'l', 1, 0, 'var', '', 0 ],
[ 'UserCountry', 'Country', 'co', 1, 0, 'var', '', 0 ],
[ 'UserWebsite', 'Webseite', 'wWWHomePage', 1, 0, 'var', '1',0 ],
],
};
# 1. Customer user backend: DB
# (customer database backend and settings)
$Self->{CustomerUser2} = {
Name => 'Customer Database',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
# if you want to use an external database, add the
# required settings
# DSN => 'DBI:odbc:yourdsn',
# DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
# User => '',
# Password => '',
Table => 'customer_user',
},
# customer unique id
CustomerKey = 'login',
# customer #
CustomerID = 'customer_id',
CustomerValid = 'valid_id',
CustomerUserListFields => ['first_name', 'last_name', 'email'],
CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => ['title','first_name','last_name'],
CustomerUserEmailUniqCheck => 1,
# # show not own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # cache time to live in sec. - cache any database queries
# CacheTTL => 0,
# # just a read only source
# ReadOnly => 1,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
[ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ],
[ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
[ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ],
[ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
# default selections
Selections => {
UserTitle => {
'Mr.' => 'Mr.',
'Mrs.' => 'Mrs.',
},
},
};
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# End of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
}
# ---------------------------------------------------- #
# needed system stuff (don't edit this) #
# ---------------------------------------------------- #
use strict;
use warnings;
use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.27 $)[1];
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');
1;
Danke für eure Hilfe!