FreeBSD 8.1 OTRS+LDAP

Moderator: DenisBY

Locked
Sindikat88
Znuny newbie
Posts: 1
Joined: 26 Sep 2011, 14:49
Znuny Version: 3.0.10

FreeBSD 8.1 OTRS+LDAP

Post by Sindikat88 »

Коллеги, добрый день.
Существует сервер на FreeBSD 8.1, на котором установлен OTRS 3.0.10. Система работает хорошо. Но хочется прикрутить сюда авторизацию пользователей из домена. Пробовал, как указано в официальной документации, и как здесь http://forums.otrs.org/viewtopic.php?f=111&t=9370
Привожу свой конфиг

Code: Select all

package Kernel::Config;
# This is an example configuration for an LDAP auth. backend (Agents!!!).
# (take care that Net::LDAP is installed!) 
Self->{AuthModule} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = '192.168.0.2';
$Self->{'AuthModule::LDAP::BaseDN'} = 'cn=Users,dc=mydomain,dc=local';
$Self->{'AuthModule::LDAP::UID'} = 'sn';

# 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::SearchUserDN'} = 'cn=otrs,cn=Users,dc=mydomain,dc=local';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'xxx';

# 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_Agents,dc=mydomain,dc=local';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
# for ldap posixGroups objectclass (just uid)
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
# for non ldap posixGroups objectclass (with full user dn)
#$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
$Self->{'AuthModule::LDAP::AlwaysFilter'} = '';

# in case you want to add a suffix to each login name, then
# you can use this option. e. g. user just want to use user but
# in your ldap directory exists user@domain.
# $Self->{'AuthModule::LDAP::UserSuffix'} = '@domain.com';

# In case you want to convert all given usernames to lower letters you
# should activate this option. It might be helpfull if databases are
# in use that do not distinguish selects for upper and lower case letters
# (Oracle, postgresql). User might be synched twice, if this option
# is not in use.
# $Self->{'AuthModule::LDAP::UserLowerCase'} = 0;

# 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->{'AuthModule::LDAP::Charset'} = 'utf-8';

# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params'} = {
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;

# --------------------------------------------------- #
# 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->{AuthSyncModule} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = '192.168.0.2';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=mydomain,dc=local';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sn';

# 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::SearchUserDN'} = 'cn=otrs,cn=Users,dc=mydomain,dc=local';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'xxx';

# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
$Self->{'AuthSyncModule::LDAP::AlwaysFilter'} = '';

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

# 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'} = 'utf-8';

# 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;
# Attributes needed for group syncs
# (attribute name for group value key)
# $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'memberUid';
# (attribute for type of group content UID/DN for full ldap name)
# $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'UID';
# $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';

# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent login) 
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
'users', 'admin', 'faq_approval', 'faq_approval', 'faq_approval', 'faq_approval',
];
use strict;
use warnings;
use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.23 $)[1];

use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

1;

ругается так, и в браузере, и в логах

Code: Select all

[Mon Sep 26 16:46:04 2011] [error] [Mon Sep 26 16:46:04 2011] -e: Can't locate object method "Load" via package "Kernel::Config" at /usr/local/otrs//Kernel/Config/Defaults.pm line 2040.\n
Где ошибка?
Locked