OTRS 3.1.0 B4 und LDAP

Hilfe zu Znuny Problemen aller Art
Locked
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Hallo Liebes OTRS-Forum,

Dieses Thema an sich wurde schon 100 mal bearbeitet doch hier ist ein Punkt an dem auch Google nicht mehr weiterhilft.

Problem:

Bei Verbindungsaufbau versuch kommt nur folgende Fehlermeldung:
„ Panic, user authenticated but no user data can be found in OTRS DB!! Perhaps the user is invalid”

In der Log kann man folgendes entnehmen:

- User: christoph.merscher (CN=Christoph CM. Merscher, OU=TechnikerBenutzer,OU=Techniker,DC=s2htest,DC=local) authentication ok (Remote_ADDR: 192.168.113.125)
- No UserID found for ‚christoph.merscher‘
- No UserID found for ‚christoph.merscher‘
Erstelle ich in den Benutzer funktioniert die LDAP verbindung problemlos.


Die Config.pm

Code: Select all

# --
# 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'} = 'otrs';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";
	$Self->{'AuthModule10'} = 'Kernel::System::Auth::DB';
    # (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} = '/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$
	
	###Agenten
		# This is an example configuration for an LDAP auth. backend.
		# (Make sure Net::LDAP is installed!)
		$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
		$Self->{'AuthModule::LDAP::Host'} = 'TechServer.s2htest.local';
		$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=s2htest,dc=local';
		$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
		# 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_allow_A,ou=Builtin,dc=s2htest,dc=local';
		$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
		# for ldap posixGroups objectclass (just uid)
		# $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
		# for non ldap posixGroups objectclass (with full user dn)
		# $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
		# 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'} = 'otrs_ldap';
		$Self->{'AuthModule::LDAP::SearchUserPw'} = 'Passwort';	#Hier steht das Richtige Passwort vermerkt.
		# 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';
		# 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,
		};
		
		$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';	
		$Self->{'AuthSyncModule::LDAP::Host'}='ldap://TechServer.s2htest.local/'; 
		$Self->{'AuthSyncModule::LDAP::BaseDN'} ='dc=s2htest,dc=local';
		$Self->{'AuthSyncModule::LDAP::UID'} ='sAMAccountName';		
		$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'otrs_ldap';
        $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Passwort';	#Hier steht das Richtige Passwort vermerkt.
		$Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
		#$Self->{'AuthSyncModule::LDAP::AlwaysFilter'} ='';
		$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
		UserFirstname => 'givenName',
		UserLastname => 'sn',
		UserEmail => 'mail',
		#UserName => 'sAMAccountName',
		#UserLogin => 'sAMAccountName',
		};
		$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
		'users',
		];
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           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;


Infrastruktur:
- Xen Server
- Windows Server 2008 R2 Enterprise (mit Active Directory)
- Ubuntu 11.10 Server
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

AuthModule -> Authentifiziert. User muss in der Datenbank vorhanden sein
AuthSyncModule -> erzeugt ggf. einen User in der Datenbank
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Achso ich dachte ich muss beides reinschreiben :shock:

Wenn ich die Auth::Module auskommentiere funktioniert es gar nicht mehr (Bn || Pw falsch).
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

musst Du auch, wenn Du den User nicht manuell anlegen willst....

Was steht denn im Logfile?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

In der Log kann man folgendes entnehmen:

- User: christoph.merscher (CN=Christoph CM. Merscher, OU=TechnikerBenutzer,OU=Techniker,DC=s2htest,DC=local) authentication ok (Remote_ADDR: 192.168.113.125)
- No UserID found for ‚christoph.merscher‘
- No UserID found for ‚christoph.merscher‘
Erstelle ich in den Benutzer funktioniert die LDAP verbindung problemlos.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

kein Fehler vom AuthSync Modul?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Nein
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

Pas mal die Zeilen


$Self->{'AuthSyncModule::LDAP::Host'}='ldap://TechServer.s2htest.local/';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'otrs_ldap';


analog des AuthModules an
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

hab ich getan.

Thu Jan 26 19:25:48 2012 notice OTRS-CGI-10 Panic! No UserData for user: 'christoph.merscher'!!!
Thu Jan 26 19:25:48 2012 error OTRS-CGI-10 No UserID found for 'christoph.merscher'!
Thu Jan 26 19:25:48 2012 error OTRS-CGI-10 No UserID found for 'christoph.merscher'!
Thu Jan 26 19:25:48 2012 notice OTRS-CGI-10 User: christoph.merscher (CN=Christoph CM. Merscher,OU=TechnikerBenutzer,OU=Techniker,DC=s2htest,DC=local) authentication ok (REMOTE_ADDR: 192.168.113.125).


$Self->{'AuthSyncModule::LDAP::Host'}='TechServer.s2htest.local';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'otrs_ldap';
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

Probiers mal mit:

$Self->{AuthSyncModule} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'TechServer.s2htest.local';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'DC=s2htest,DC=local';
$Self->{'AuthSyncModule::LDAP::UID'} = 'samaccountname';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = ''otrs_ldap;
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Passwort';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
# DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
$Self->{'AuthSyncModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
$Self->{'AuthSyncModule::LDAP::Die'} = 1;
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Brachte leider auch keinen erfolg:

Fri Jan 27 08:53:26 2012 notice OTRS-CGI-10 Panic! No UserData for user: 'christoph.merscher'!!!
Fri Jan 27 08:53:26 2012 error OTRS-CGI-10 No UserID found for 'christoph.merscher'!
Fri Jan 27 08:53:26 2012 error OTRS-CGI-10 No UserID found for 'christoph.merscher'!
Fri Jan 27 08:53:26 2012 notice OTRS-CGI-10 User: christoph.merscher (CN=Christoph CM. Merscher,OU=TechnikerBenutzer,OU=Techniker,DC=s2htest,DC=local) authentication ok (REMOTE_ADDR: 192.168.113.125).
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

hm, alle caches gelöscht? Apache neue gestartet? Eigentlich funktioniert das ohne Probleme.


Das nichts weiteres geloggt wird halte ich für bedenklich...

Handelt es sich um das Debian Paket oder um eine tar.gz Installation?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Apache neu gestartet und otrs.DeleteCache ausgeführt.

Um eine tar.gz Installation.

Ich dachte das es evtl. an der Beta von OTRS 3.1.0 liegt.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

eigentlich sollte sich an diesem Teil Code nichts geändert haben
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

... Dan weiß icht was schief läuft ...
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Ist keine lösung zum Problem aber:

Die selbe einstellungen für OTRS 3.0.11 funktioniert Problemlos.

Liegt also doch an der version evtl. an der Beta.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 3.1.0 B4 und LDAP

Post by jojo »

dann mach bitte einen Bug auf
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kleiner
Znuny newbie
Posts: 11
Joined: 26 Jan 2012, 17:10
Znuny Version: 3.1.0b4
Real Name: Christoph Merscher
Company: Service 2 Help

Re: OTRS 3.1.0 B4 und LDAP

Post by kleiner »

Alles klar mache ich.
Locked