[Solved] check LDAP settings and my config.pm is empty?

Moderator: crythias

Locked
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

[Solved] check LDAP settings and my config.pm is empty?

Post by EXG133 »

Hi again,

I'm attempting LDAP and configured it using the web interface. It's not working correctly so for the first time I decided to check the config.pm (located in OTRS\Kernel ). I was amazed to find the following:


# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2011 xxx, 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'} = '**EDITED OUT**';
# 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} = 4**EDITED OUT**';

# ---------------------------------------------------- #
# 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} = '**EDITED OUT**';
# $DIBI$


# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# 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;


I thought all changes made through the sysconfig were saved in config.pm because everything else is overwritten when you upgrade?

The change of my sysconfig was successful because I get the following result when I try to authenticate on my customer.pl : "Authentication succeeded, but no customer record is found in the customer backend. Please contact your administrator." So I'm definately using LDAP. Am I being dense or is this weird? :(
Last edited by EXG133 on 04 Sep 2012, 16:41, edited 1 time in total.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Wanted to check LDAP settings and my config.pm is empty?

Post by crythias »

Changes in SysConfig are saved in xml files in Kernel/Config/Files.

In my opinion, (and this is *JUST* an opinion), authentication being presented in the GUI is a disservice, especially for the reasons you encounter.

Best that items are copied from Defaults.pm to Config.pm and modified within Config.pm.

Now, to your error:
EXG133 wrote:"Authentication succeeded, but no customer record is found in the customer backend. Please contact your administrator."
It means what it says, and you will need to make sure that part is added to your Config.pm

viewtopic.php?f=60&t=16543
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: Wanted to check LDAP settings and my config.pm is empty?

Post by EXG133 »

Thanks for the clarification!

http://doc.otrs.org/3.1/en/html/configu ... onfigfiles
&
http://doc.otrs.org/3.1/en/html/sysconfig.html

Those articles I think should be clarified. After reading them I felt secure that sqldump + copying my config.pm was sufficient as backup but I need to include all of OTRS\Kernel\Config\Files too.

You're entirely correct about the webinterface, I figured I'd save myself some time by using the webinterface. Lesson learned, config.pm it is.

The customerbackend is indeed not working, I will post a different topic if I run into issues.
Locked