Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # --
- # Kernel/Config.pm - Config file for OTRS kernel
- # Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
- # --
- # $Id: Config.pm.dist,v 1.25 2011/09/16 10:58:28 mg 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'} = 'hot';
- # DatabaseDSN
- # (The database DSN for MySQL ==> more: "man DBD::mysql")
- $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
- # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
- # if you want to use a local socket connection
- # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
- # if you want to use a tcpip connection
- # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";
- # if you have PostgresSQL 8.1 or earlier, activate the legacy driver with this line:
- # $Self->{DatabasePostgresqlBefore82} = 1;
- # ---------------------------------------------------- #
- # fs root directory
- # ---------------------------------------------------- #
- $Self->{Home} = 'C:/OTRS/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 #
- # ---------------------------------------------------- #
- $Self->{LogModule} = 'Kernel::System::Log::File';
- $Self->{LogModule::LogFile} = 'C:/OTRS/OTRS/var/log/otrs.log';
- # $DIBI$
- $Self->{'DefaultCharset'} = 'utf-8';
- #+ аутентификация + авторизация LDAP
- # Enable LDAP Authentication Sync for Agent #
- $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
- $Self->{'AuthSyncModule::LDAP::Host'} = 'w2003.smallbusiness.local';# заменить значение !
- $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'OU=Agents OTRS,dc=smallbusiness,dc=local';# заменить значение !
- $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
- $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
- $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=otrs,CN=Users,dc=smallbusiness,dc=local';# заменить значение !
- $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'password';# заменить значение !
- # Enable Agent Mapping from LDAP to DB #
- $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
- UserFirstname => 'givenName',
- UserLastname => 'sn',
- UserEmail => 'mail',
- };
- $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
- 'users',
- ];
- $Self->{'AuthModule::LDAP::Params'} = {
- port => 389,
- timeout => 120,
- async => 0,
- version => 3,
- };
- # Authenticate customer users against an LDAP backend #
- $Self->{CustomerUser} = {
- Name => 'Active Directory',
- Module => 'Kernel::System::CustomerUser::LDAP',
- Params => {
- Host => 'w2003.smallbusiness.local', # заменить значение !
- BaseDN => 'OU=Customers OTRS,dc=smallbusiness,dc=local', # заменить значение !
- SSCOPE => 'sub',
- UserDN => 'CN=otrs,CN=Users,dc=smallbusiness,dc=local', # заменить значение !
- UserPw => 'password', # заменить значение !
- AlwaysFilter => '(&(objectcategory=person)(objectclass=user)(mail=*)(!(description=built-In))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',
- SourceCharset => 'utf-8',
- DestCharset => 'utf-8',
- },
- ReadOnly => 1,
- CustomerKey => 'sAMAccountName',
- CustomerID => 'mail',
- CustomerUserListFields => ['givenname', 'sn', 'mail'],
- CustomerUserSearchFields => ['displayName','sAMAccountName','givenName', 'sn', 'mail','description'],
- CustomerUserSearchPrefix => '',
- CustomerUserSearchSuffix => '*',
- CustomerUserPostMasterSearchFields => ['displayName','sAMAccountName','givenName','sn','mail','description'],
- CustomerUserNameFields => ['givenname', 'sn'],
- CustomerUserExcludePrimaryCustomerID => 0,
- CacheTTL => 120,
- Map => [
- [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
- [ 'UserFirstname', 'Firstname', 'givenName', 1, 1, 'var' ],
- [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
- [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
- [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
- [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
- [ 'UserPhone', 'Phone', 'telephoneNumber', 1, 0, 'var' ],
- [ 'UserAddress', 'Address', 'postalAddress', 1, 0, 'var' ],
- [ 'UserStreet', 'Street', 'streetAddress', 1, 0, 'var' ],
- [ 'UserCity', 'City', 'l', 1, 0, 'var' ],
- [ 'UserZip', 'ZIP', 'postalCode', 1, 0, 'var' ],
- [ 'UserCountry', 'Country', 'co', 1, 0, 'var' ],
- [ 'UserComment', 'Comment', 'wWWHomePage', 1, 0, 'var' ],
- ],
- };
- #- аутентификация + авторизация LDAP
- #+ single sign on
- $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
- $Self->{'Customer::AuthModule::LDAP::Charset'} = 'utf-8';
- $Self->{'Customer::AuthModule::LDAP::SourceCharset'} = 'utf-8';
- $Self->{'Customer::AuthModule::LDAP::DestCharset'} = 'utf-8';
- $Self->{'Customer::AuthModule::HTTPBasicAuth::Replace'} = 'smallbusiness\\'; # заменить значение ! при опции SSPIOmitDomain On вся строка не требуется
- $Self->{CustomerPanelLoginURL} = 'http://yandex.ru'; # заменить значение !
- $Self->{CustomerPanelLogoutURL} = 'http://google.com'; # заменить значение !
- $Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';
- $Self->{'AuthModule::LDAP::Charset'} = 'utf-8';
- $Self->{'AuthModule::LDAP::SourceCharset'} = 'utf-8';
- $Self->{'AuthModule::LDAP::DestCharset'} = 'utf-8';
- $Self->{'AuthModule::HTTPBasicAuth::Replace'} = 'smallbusiness\\'; # заменить значение ! при опции SSPIOmitDomain On вся строка не требуется
- $Self->{AgentPanelLoginURL} = 'http://yandex.ru'; # заменить значение !
- $Self->{AgentPanelLogoutURL} = 'http://google.com'; # заменить значение !
- #- single sign on
- # ---------------------------------------------------- #
- # ---------------------------------------------------- #
- # #
- # 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.25 $)[1];
- use Kernel::Config::Defaults;
- push (@ISA, 'Kernel::Config::Defaults');
- # -----------------------------------------------------#
- 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement