OTRS 6 Beta - verbindung zur Active Directory /LDAP

Hilfe zu OTRS Problemen aller Art
Post Reply
annaburgart
Znuny newbie
Posts: 6
Joined: 07 Mar 2017, 11:55
Znuny Version: 3.2.10

OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by annaburgart »

Hallo,

1. seit dem ich auf OTRS 6 Beta upgedatet habe, kriege ich keine Verbindung zur LDAP.
Ich habe schon alles mögliche ausprobiert, aber mit altem Config.pm funktioniert es nicht. Ich kriege dann überhaupt keine Verbindung zur OTRS Seite.


__________________________________________________
package Kernel::Config;

use strict;
use warnings;
use utf8;

sub Load {
my $Self = shift;

# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #

# The database host
$Self->{'DatabaseHost'} = '127.0.0.1';

# The database name
$Self->{'Database'} = "otrs";

# The database user
$Self->{'DatabaseUser'} = "otrs";

# The password of database user. You also can use bin/otrs.Console.pl Maint::Database::PasswordCrypt
# for crypted passwords
$Self->{'DatabasePw'} = 's+++++m';

# The database DSN for MySQL ==> more: "perldoc DBD::mysql"
$Self->{'DatabaseDSN'} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost}";

# The database DSN for PostgreSQL ==> more: "perldoc DBD::Pg"
# if you want to use a local socket connection
# $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";

# $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

# The database DSN for Microsoft SQL Server - only supported if OTRS is
# installed on Windows as well
# $Self->{DatabaseDSN} = "DBI:ODBC:driver={SQL Server};Database=$Self->{Database};Server=$Self->{DatabaseHost},1433";

# The database DSN for Oracle ==> more: "perldoc DBD::oracle"
# $Self->{DatabaseDSN} = "DBI:Oracle://$Self->{DatabaseHost}:1521/$Self->{Database}";
#
# $ENV{ORACLE_HOME} = '/path/to/your/oracle';
# $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS';
# $ENV{NLS_LANG} = 'AMERICAN_AMERICA.AL32UTF8';

# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = '/opt/otrs';

###########################################################################################
#------------------------------------------------------------------------------------------------------------------------------#
# LDAP Anbindung Firma #
#------------------------------------------------------------------------------------------------------------------------------#

#------------------------------------------------------------------------------------------------------------------------------#
# Authentifizierung Agenten via LDAP (AD) Firma #
#------------------------------------------------------------------------------------------------------------------------------#

$Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'server.global.eu';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=global,dc=eu';
$Self->{'AuthModule::LDAP::UID'} = 'samaccountname';
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=Domänen-Benutzer *,cn=User,dc=global,dc=eu'; *-soll hier wirkliche Name stehenn, z,b Bernd.Mayer (anmeldename)?
#$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=otrsadmin,ou=department,ou=division,dc=global,dc=eu';

$Self->{'AuthModule::LDAP::SearchUserPw'} = 'J+++++6';

$Self->{'UserSyncLDAPMap'} = {
'UserEmail' => 'mail',
'UserFirstname' => 'givenName',
'UserLastname' => 'sn',
'UserLogin' => 'sAMAccountName'
};
#------------------------------------------------------------------------------------------------------------------------------#
# Customer #
#------------------------------------------------------------------------------------------------------------------------------#
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'server.global.eu';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} ='dc=global,dc=eu';

$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'CN=Domänen-Benutzer,cn=User,dc=global,dc=eu';*-soll hier wirkliche Name stehenn, z,b Bernd.Mayer (anmeldename)?
#$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=otrsadmin,ou=department,ou=division,dc=global,dc=eu';

$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'J+++++6';
$Self->{'Customer::AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
#------------------------------------------------------------------------------------------------------------------------------#
# LDAP System Users #
#------------------------------------------------------------------------------------------------------------------------------#
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'server.global.eu';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=global,dc=eu';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=otrsadmin,ou=department,ou=division,dc=global,dc=eu';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'J+++++6';
$Self->{'AuthModule::LDAP::Params'} = {
'async' => '0',
'timeout' => '120',
'version' => '3',
'port' => '389'
};

$Self->{'AuthModule::LDAP::Die'} = 1;

#------------------------------------------------------------------------------------------------------------------------------#
# UserSyncLDAPMap #
#------------------------------------------------------------------------------------------------------------------------------#

$Self->{'UserSyncLDAPMap'} = {
'UserEmail' => 'mail',
'UserFirstname' => 'givenName',
'UserLastname' => 'sn',
'UserLogin' => 'sAMAccountName'
};

$Self->{CustomerUser1} = {
Name => 'Firma Customer',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'server.global.eu',
BaseDN => 'dc=global,dc=eu',
SSCOPE => 'sub',
UserDN => 'cn=otrsadmin,ou=department,ou=division,dc=global,dc=eu',
UserPw => 'J+++++6',
AlwaysFilter => '(&(objectCategory=person))',
# AlwaysFilter => '(&(objectclass=user)(mail=*.*@Firma.de..)',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
CustomerUserSearchListLimit => 1000,

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' ],
],
};
#------------------------------------------------------------------------------------------------------------------------------#
# Firma Ende #
#------------------------------------------------------------------------------------------------------------------------------#
##########################################################################################

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

# ---------------------------------------------------- #
# ----------------------------------------------------- #
# #
# end of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this) #
# ---------------------------------------------------- #

use Kernel::Config::Defaults; # import Translatable()
use base qw(Kernel::Config::Defaults);

# -----------------------------------------------------#

1;
______________________________________________________________

2. Noch was ist mir aufgefallen, warum holt OTRS meine (auf meine E-mailadresse geschickte Emails ab, z.b. Termineanfragen).
meine E-mailadresse hat nix mit otsadmin zu tun :( Ich bin nicht wie ich angemeldet, sondern als otrsadmin. Ich verstehe es nicht :(

Ich bin eine blutige Anfängerin, was OTRS angeht und habe alle aus dem OTRS Benutzerhanbuch und Forums, deswegen bitte spricht mir mir ruhig wie mit einem "zurückgebliebenen" :)

LG Anna
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by root »

Hallo Anna,

gibt es denn Einträge im OTRS Logfile?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by reneeb »

zu 1.) Gibt es denn Fehlermeldungen im Apache-Log oder im OTRS-Log?
zu 2.) OTRS wird Deine Mails nur abholen, wenn Du ein Postfach im OTRS entsprechend angelegt hast. Ist Deine Mailadresse denn unter Admin -> Postmaster E-Mail-Konten angelegt?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
annaburgart
Znuny newbie
Posts: 6
Joined: 07 Mar 2017, 11:55
Znuny Version: 3.2.10

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by annaburgart »

Ich muss nun nur kurz Log Datei finden, sorry...ich weiß, dass ich die schon mal ausgewertet habe, aber wo es genau war, muss ich kurz suchen. :?
annaburgart
Znuny newbie
Posts: 6
Joined: 07 Mar 2017, 11:55
Znuny Version: 3.2.10

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by annaburgart »

1. Logs:

rom otrs@jcm-otrs01.localdomain Mon Sep 18 15:20:01 2017
Return-Path: <otrs@otrs01.localdomain>
X-Original-To: root@localhost
Delivered-To: root@localhost.localdomain
Received: by otrs01.localdomain (Postfix, from userid 1001)
id 64F9A2281AF3; Mon, 18 Sep 2017 15:20:01 +0200 (CEST)
From: "(Cron Daemon)" <otrs@otrs01.localdomain> *(soll da nicht meine domainmane stehen?- das was da steht ist original das was in logs seteht, ohne änderungen)
To: root@localhost.localdomain *(soll da nicht meine domainmane stehen?- das was da steht ist original das was in logs seteht, ohne änderungen)
Subject: Cron <otrs@otrs01> $HOME/bin/otrs.Daemon.pl start >> /dev/null * und hier wiederrum steht nicht mal .localdomain
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=33>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/1001>
X-Cron-Env: <LANG=de_DE.UTF-8>
X-Cron-Env: <MAILTO=root@localhost>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/opt/otrs>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=otrs>
X-Cron-Env: <USER=otrs>
Message-Id: <20170918132001.64F9A2281AF3@otrs01.localdomain>
Date: Mon, 18 Sep 2017 15:20:01 +0200 (CEST)

Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 110.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 113.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 116.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 120.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 123.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 123.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 123.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 145.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 180.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 182.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 184.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 188.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 190.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 194.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 196.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 204.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 208.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 230.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 232.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 234.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 238.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 240.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 246.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 250.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 252.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 272.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 274.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 276.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 278.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 280.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 282.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 284.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 298.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 310.
Global symbol "$Self" requires explicit package name at /opt/otrs/Kernel/Config.pm line 324.
Unmatched right curly bracket at /opt/otrs/Kernel/Config.pm line 416, at end of line
/opt/otrs/Kernel/Config.pm has too many errors.
Compilation failed in require at /opt/otrs/Kernel/System/ObjectManager.pm line 24.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/ObjectManager.pm line 24.
Compilation failed in require at /opt/otrs/bin/otrs.Daemon.pl line 35.
BEGIN failed--compilation aborted at /opt/otrs/bin/otrs.Daemon.pl line 35.

line 110 ist quasi: $Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP'; - da wo es mit $Self anfängt.
habe ich vergessen etwas zu aktivieren?

2. Das ist ja der Witz, unter Admin -> Postmaster E-Mail-Konten stehen nur 2 User: root und otrsadmin, mich mit meine meiner emailadresse gibt es ja nicht.
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by zzz »

Hey annaburgart,

schau Dir den Code mal an:

Unmatched right curly bracket at /opt/otrs/Kernel/Config.pm line 416, at end of line


Gruß
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
annaburgart
Znuny newbie
Posts: 6
Joined: 07 Mar 2017, 11:55
Znuny Version: 3.2.10

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by annaburgart »

Danke zzz,

du hast Recht, das war total unnötige Klamer, aber hat leider nicht viel gebracht :(

ich habe hier was nachgeschaut, sieht für mich auch komisch aus:
[root@jcm-otrs01 ~]# systemctl status network
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mo 2017-09-18 15:47:20 CEST; 1min 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 8275 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Sep 18 15:47:20 otrs01 network[8275]: RTNETLINK answers: File exists
Sep 18 15:47:20 otrs01 network[8275]: RTNETLINK answers: File exists
Sep 18 15:47:20 otrs01 network[8275]: RTNETLINK answers: File exists
Sep 18 15:47:20 otrs01 network[8275]: RTNETLINK answers: File exists
Sep 18 15:47:20 otrs01 network[8275]: RTNETLINK answers: File exists
Sep 18 15:47:20 otrs01 network[8275]: RTNETLINK answers: File exists
Sep 18 15:47:20 otrs01 systemd[1]: network.service: control process exited, code=exited status=1
Sep 18 15:47:20 otrs01 systemd[1]: Failed to start LSB: Bring up/down networking.
Sep 18 15:47:20 otrs01 systemd[1]: Unit network.service entered failed state.
Sep 18 15:47:20 otrs01 systemd[1]: network.service failed.


:( :( :( :(
Aber waruuum....oder hat ein mit dem anderem nicht viel zu tun?
annaburgart
Znuny newbie
Posts: 6
Joined: 07 Mar 2017, 11:55
Znuny Version: 3.2.10

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by annaburgart »

[root@otrs01 ~]# systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mo 2017-09-18 13:43:10 CEST; 2h 13min ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 1068 (/usr/sbin/httpd)
Status: "Total requests: 76; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─ 1068 /usr/sbin/httpd -DFOREGROUND
├─ 1820 /usr/sbin/httpd -DFOREGROUND
├─ 1821 /usr/sbin/httpd -DFOREGROUND
├─ 1822 /usr/sbin/httpd -DFOREGROUND
├─ 1823 /usr/sbin/httpd -DFOREGROUND
├─ 1824 /usr/sbin/httpd -DFOREGROUND
├─14523 /usr/sbin/httpd -DFOREGROUND
├─14547 /usr/sbin/httpd -DFOREGROUND
├─14548 /usr/sbin/httpd -DFOREGROUND
└─14549 /usr/sbin/httpd -DFOREGROUND

Sep 18 13:43:09 otrs01 systemd[1]: Starting The Apache HTTP Server...
Sep 18 13:43:09 otrs01 httpd[1068]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.1xx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message
Sep 18 13:43:10 otrs01 systemd[1]: Started The Apache HTTP Server.
Sie haben neue Post in /var/spool/mail/root.

Im Log steht dann genau das gleiche wie ganz oben, was ich schon gepostet habe aus dem Log
annaburgart
Znuny newbie
Posts: 6
Joined: 07 Mar 2017, 11:55
Znuny Version: 3.2.10

Re: OTRS 6 Beta - verbindung zur Active Directory /LDAP

Post by annaburgart »

} - die Klammer war doch nicht falsch, nur der Platz WO man diese Einstellungen reinkopiert ist - wichtig!
Post Reply