Kundenlogin nicht möglich mit LDAP

Hilfe zu OTRS Problemen aller Art
Post Reply
albsie
Znuny newbie
Posts: 9
Joined: 20 Dec 2016, 14:11
Znuny Version: 5.0.18

Kundenlogin nicht möglich mit LDAP

Post by albsie »

Hallo,
nachdem ich hier im Forum rauf und runter gesucht habe, habe ich mich dazu durchgerungen hier zu fragen.
Ich bin gerade dabei Kunden per LDAP in OTRS zu integrieren.
Ich kann die Kunden auch alle unter der Kundenbenutzerverwaltung erkennen, aber es gelingt mir nicht, dass sich die Kunden über die costumer.pl anmelden können.

Es kommt sporadisch mal diese Fehlermeldung:

Code: Select all

[Thu Mar 30 16:04:35 2017][Error][Kernel::System::CustomerAuth::LDAP::new][41] Need Customer::AuthModule::LDAPHost in Kernel/Config.pm
oder ein Error 500 mit dieser Meldung

Code: Select all

[Thu Mar 30 16:15:28.482089 2017] [perl:error] [pid 2547:tid 140584907908864] [client 172.29.1.53:37506] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://172.29.1.89/otrs/index.pl?Action=AdminCustomerUser;Nav=Agent
[Thu Mar 30 16:15:32.948781 2017] [perl:error] [pid 2548:tid 140584857552640] [client 172.29.1.53:37508] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://172.29.1.89/otrs/index.pl?Action=AdminCustomerUser;Nav=Agent
[Thu Mar 30 16:15:33.845490 2017] [:error] [pid 2548:tid 140584849159936] Attempt to reload Kernel/System/ObjectManager.pm aborted.\nCompilation failed in require at /opt/otrs/bin/cgi-bin/index.pl line 35.\nBEGIN failed--compilation aborted at /opt/otrs/bin/cgi-bin/index.pl line 35.\n
[Thu Mar 30 16:17:39.062860 2017] [perl:error] [pid 2548:tid 140585000228608] [client 172.29.1.53:37627] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://172.29.1.89/otrs/customer.pl
[Thu Mar 30 16:17:46.433280 2017] [perl:error] [pid 2547:tid 140584857552640] [client 172.29.1.53:37633] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://172.29.1.89/otrs/customer.pl
[Thu Mar 30 16:47:38.491500 2017] [perl:error] [pid 2548:tid 140584933086976] [client 172.29.1.53:38710] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://172.29.1.89/otrs/customer.pl
ERROR: OTRS-CGI-06 Perl: 5.22.1 OS: linux Time: Thu Mar 30 16:47:42 2017

 Message: Need Customer::AuthModule::LDAPHost in Kernel/Config.pm

 RemoteAddress: 172.29.1.53
 RequestURI: /otrs/customer.pl

 Traceback (2548):
   Module: Kernel::System::CustomerAuth::LDAP::new Line: 41
   Module: Kernel::System::CustomerAuth::new Line: 69
   Module: Kernel::System::ObjectManager::_ObjectBuild Line: 226
   Module: Kernel::System::ObjectManager::Get Line: 180
   Module: Kernel::System::Web::InterfaceCustomer::Run Line: 224
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_customer_2epl::handler Line: 40
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Thu Mar 30 16:47:42.213135 2017] [perl:error] [pid 2547:tid 140585008621312] [client 172.29.1.53:38713] Attempt to reload /opt/otrs/Kernel/Config.pm aborted.\nCompilation failed in require at /opt/otrs/Kernel/cpan-lib/Apache2/Reload.pm line 179.\n, referer: http://172.29.1.89/otrs/customer.pl
ERROR: OTRS-CGI-06 Perl: 5.22.1 OS: linux Time: Thu Mar 30 16:47:51 2017

 Message: Need Customer::AuthModule::LDAPHost in Kernel/Config.pm

 RemoteAddress: 172.29.1.53
 RequestURI: /otrs/customer.pl

 Traceback (2548):
   Module: Kernel::System::CustomerAuth::LDAP::new Line: 41
   Module: Kernel::System::CustomerAuth::new Line: 69
   Module: Kernel::System::ObjectManager::_ObjectBuild Line: 226
   Module: Kernel::System::ObjectManager::Get Line: 180
   Module: Kernel::System::Web::InterfaceCustomer::Run Line: 224
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_customer_2epl::handler Line: 40
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32
Ich habe einen Beitrag hier im Forum gefunden, der das gleiche Problem behandelte viewtopic.php?f=35&t=34519 mir aber nicht die lösung brachte.

So sieht meine config.pm aus

Code: Select all

# --
# Copyright (C) 2001-2016 xxx, http://otrs.com/
# --
# 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:
#
#  -->> Most OTRS configuration should be done via the OTRS web interface
#       and the SysConfig. Only for some configuration, such as database
#       credentials and customer data source changes, you should edit this
#       file. For changes do customer data sources you can copy the definitions
#       from Kernel/Config/Defaults.pm and paste them in this file.
#       Config.pm will not be overwritten when updating OTRS.
# --

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'} = "hggghh";

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

    # 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};";
    # if you want to use a TCP/IP connection
#    $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';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #

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


################################################################################################################################
#------------------------------------------------------------------------------------------------------------------------------#
#                                                            Customer                                                          #
#------------------------------------------------------------------------------------------------------------------------------#
        $Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
        $Self->{'Customer::AuthModule::LDAP::Host1'} = 'HOST';
        $Self->{'Customer::AuthModule::LDAP::BaseDN1'} ='DC=firma,DC=de'; # hier die DN
		# in der eure User liegen, kommt halt drauf an wie eurer AD strukturiert ist
        $Self->{'Customer::AuthModule::LDAP::UID1'} = 'uid';
		$Self->{'Customer::AuthModule::LDAP::GroupDN1'} = 'cn=teachers,ou=accounts,DC=firma,DC=de'; # das gleiche wie bei den Agents
		# nur wer in der Gruppe 'otrscustomer' ist darf sich einloggen
		$Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
    		$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
        $Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = 'sa'; #s.o. das hier wäre dann der userPrincipalName
		#ob es irgenwelche Nachteile hat wenn man den userPrincipalName anstatt der DN nimmt weiss ich nicht...
        $Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = 'as';
		$Self->{'Customer::AuthModule::LDAP::Params1'} = {
            port => 389,
            timeout => 120,
            async => 0,
            version => 3,
			};
	

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

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

    $Self->{CustomerUser1} = {
    Name => 'Name',
    Module => 'Kernel::System::CustomerUser::LDAP',
	Params => {
    Host => 'HOST',
    BaseDN => 'ou=accounts,DC=firma,DC=de', 
    SSCOPE => 'sub',
   UserDN => '', # wieder DN oder UserPrincipalName
   UserPw => '',
	# falls ihr was ausschliessen wollt:
	# AlwaysFilter =>  '(&(objectclass=user)(mail=*.*@Firma.de)(!((was auch immer)))',
    },
    CustomerKey => 'uid',
    CustomerID => 'mail',
    CustomerUserListFields => ['uid', 'cn', 'mail'],
    CustomerUserSearchFields => ['uid', 'cn', 'mail'],
	CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
	CustomerUserSearchListLimit => 1000,  # die Anzahl der User die in euerer Kundenübersicht maximal angezeit werden.
    # die Zeile muss nicht rein, macht aber bei uns hier Sinn.	

    Map => [
    [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'uid', 1, 1, 'var' ],
    [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
    ],
    };

#------------------------------------------------------------------------------------------------------------------------------#
#                                                     Firma Ende                                                               #
#------------------------------------------------------------------------------------------------------------------------------#
################################################ENDE DER BENUTZERDEFINIERTEN KONFIG###########
    $Self->{LogModule}          = 'Kernel::System::Log::File';
    $Self->{LogModule::LogFile} = '/var/log/otrs.log';
# $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 base qw(Kernel::Config::Defaults);

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

1;
und das ergibt Checkmodule.pm

Code: Select all

  o Apache::DBI......................ok (v1.12)
  o Apache2::Reload..................ok (v0.13)
  o Archive::Tar.....................ok (v2.04)
  o Archive::Zip.....................ok (v1.56)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.73_04)
  o Date::Format.....................ok (v2.24)
  o DBI..............................ok (v1.634)
  o DBD::mysql.......................ok (v4.033)
  o DBD::ODBC........................ok (v1.52)
  o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................Not installed! Use: 'apt-get install -y libdbd-pg-perl' (optional - Required to connect to a PostgreSQL database.)
  o Encode::HanExtra.................Not installed! Use: 'apt-get install -y libencode-hanextra-perl' (optional - Required to handle mails with several Chinese character sets.)
  o IO::Socket::SSL..................ok (v2.024)
  o JSON::XS.........................ok (v3.01)
  o List::Util::XS...................ok (v1.41)
  o LWP::UserAgent...................ok (v6.13)
  o Mail::IMAPClient.................ok (v3.38)
    o IO::Socket::SSL................ok (v2.024)
  o ModPerl::Util....................ok (v2.000009)
  o Net::DNS.........................ok (v0.81)
  o Net::LDAP........................ok (v0.65)
  o Template.........................ok (v2.24)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.21)
  o Time::HiRes......................ok (v1.9726)
  o Time::Piece......................ok (v1.29)
  o XML::LibXML......................ok (v2.0123)
  o XML::LibXSLT.....................ok (v1.94)
  o XML::Parser......................ok (v2.44)
  o YAML::XS.........................ok (v0.41)
Version: OTRS::ITSM 5s 5.0.18
Additional Packages: DynamicFieldITSMConfigItem
OS: Ubuntu 16.04
albsie
Znuny newbie
Posts: 9
Joined: 20 Dec 2016, 14:11
Znuny Version: 5.0.18

Re: Kundenlogin nicht möglich mit LDAP

Post by albsie »

Update,
ich habe jetzt mal die Config von Boris http://lists.otrs.org/pipermail/otrs-de ... 13350.html genommen und nur den Agent Teil entfernt, da ich ihn nicht brauche. Jetzt kann ich mich mit den Benutzern der internen OTRS-DB anmelden, aber LDAP Benutzer können sich immer noch nicht auf der Kundenseite anmelden. Hier meine aktuelle Config

Code: Select all

# --
# Copyright (C) 2001-2016 xxx, http://otrs.com/
# --
# 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:
#
#  -->> Most OTRS configuration should be done via the OTRS web interface
#       and the SysConfig. Only for some configuration, such as database
#       credentials and customer data source changes, you should edit this
#       file. For changes do customer data sources you can copy the definitions
#       from Kernel/Config/Defaults.pm and paste them in this file.
#       Config.pm will not be overwritten when updating OTRS.
# --

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'} = 'passwort';

    # 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};";
    # if you want to use a TCP/IP connection
#    $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';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
################################################################################################################################
#------------------------------------------------------------------------------------------------------------------------------#
#                                                        LDAP Anbindung Hanse-Berufskolleg                                               #
#------------------------------------------------------------------------------------------------------------------------------#


################################################################################################################################
								#----------------------------------------------------------#
								#                                                          #
								#        LDAP Authentifizierung Agenten und Customer       #
								#                                                          #
								#----------------------------------------------------------#
								
								
#Agenten Authentifizierung DB
   #Backend DB fuer Agenten
   $Self->{'AuthModule10'} = 'Kernel::System::Auth::DB';
   $Self->{'AuthModule::DB::CryptType10'} = 'crypt';
   



################################################################################################################################

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

################################################################################################################################
#------------------------------------------------------------------------------------------------------------------------------#
#                                                            Customer                                                          #
#------------------------------------------------------------------------------------------------------------------------------#
        $Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
        $Self->{'Customer::AuthModule::LDAP::Host1'} = 'IP';
        $Self->{'Customer::AuthModule::LDAP::BaseDN1'} ='OU=accounts,DC=firma,DC=de'; # hier die DN
		# in der eure User liegen, kommt halt drauf an wie eurer AD strukturiert ist
        $Self->{'Customer::AuthModule::LDAP::UID1'} = 'UID';
		$Self->{'Customer::AuthModule::LDAP::GroupDN1'} = 'CN=teachers,OU=groups,DC=firma,DC=de'; # das gleiche wie bei den Agents
		# nur wer in der Gruppe 'otrscustomer' ist darf sich einloggen
		$Self->{'Customer::AuthModule::LDAP::AccessAttr1'} = 'memberUid'; #s.o.
        $Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = '{0}'; #s.o. das hier wäre dann der userPrincipalName
		#ob es irgenwelche Nachteile hat wenn man den userPrincipalName anstatt der DN nimmt weiss ich nicht...
        $Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = '';
		$Self->{'Customer::AuthModule::LDAP::Params1'} = {
            port => 389,
            timeout => 120,
            async => 0,
            version => 3,
			};
	
#------------------------------------------------------------------------------------------------------------------------------#
#                                                       LDAP System Users                                                      #
#------------------------------------------------------------------------------------------------------------------------------#
        $Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP';
        $Self->{'AuthModule::LDAP::Host1'} =  'IP';
        $Self->{'AuthModule::LDAP::BaseDN1'} =  'DC=Firma,DC=de';
        $Self->{'AuthModule::LDAP::UID1'} =  'uid';
        $Self->{'AuthModule::LDAP::SearchUserDN1'} =  '{0}';
        $Self->{'AuthModule::LDAP::SearchUserPw1'} =  '';
        $Self->{'AuthModule::LDAP::Params1'} =  {
              'async' => '0',
              'timeout' => '120',
              'version' => '3',
              'port' => '389'
			};

		$Self->{'AuthModule::LDAP::Die1'} = 1;
	
#------------------------------------------------------------------------------------------------------------------------------#
#                                                           UserSyncLDAPMap                                                    #
#------------------------------------------------------------------------------------------------------------------------------#

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

    $Self->{CustomerUser1} = {
    Name => 'LDAP-Backend',
    Module => 'Kernel::System::CustomerUser::LDAP',
	Params => {
    Host => 'IP',
    BaseDN => 'DC=Firma,DC=de', 
    SSCOPE => 'sub',
    UserDN => '{0}', # wieder DN oder UserPrincipalName
    UserPw => '',
	#AlwaysFilter =>  '(|(mail=*@firma.de)(uid=benutzer))',
	# falls ihr was ausschliessen wollt:
	# AlwaysFilter =>  '(&(objectclass=user)(mail=*.*@Firma.de)(!((was auch immer)))',
    },
    CustomerKey => 'uid',
    CustomerID => 'mail',
    CustomerUserListFields => ['uid', 'cn', 'mail'],
    CustomerUserSearchFields => ['uid', 'cn', 'mail'],
	CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
	CustomerUserSearchListLimit => 2500,  # die Anzahl der User die in euerer Kundenübersicht maximal angezeit werden.
    # die Zeile muss nicht rein, macht aber bei uns hier Sinn.	

    Map => [
    [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'uid', 1, 1, 'var' ],
    [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
    ],
    };

#------------------------------------------------------------------------------------------------------------------------------#
#                                                     Firma Ende                                                               #
#------------------------------------------------------------------------------------------------------------------------------#
################################################################################################################################


#DB CustomerUser
# Customer DB Authentication
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
$Self->{'Customer::AuthModule::DB::Table'} = 'customer_user';
$Self->{'Customer::AuthModule::DB::CustomerKey'} = 'login';
$Self->{'Customer::AuthModule::DB::CustomerPassword'} = 'pw';
# CustomerUser (customer database backend and settings)
$Self->{CustomerUser} = {
    Name => 'Database Datasource',
    Module => 'Kernel::System::CustomerUser::DB',
    Params => {
        # if you want to use an external database, add the required settings
#            DSN => 'DBI:odbc:yourdsn',
#            Type => 'mssql', # only for ODBC connections
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => 'customer_user',

            # CaseSensitive will control if the SQL statements need LOWER()
            #   function calls to work case insensitively. Setting this to
            #   1 will improve performance dramatically on large databases.
            CaseSensitive => 0,
        },
# customer unique id
CustomerKey => 'login',

# customer #
CustomerID => 'customer_id',
CustomerValid => 'valid_id',
    CustomerUserListFields => ['first_name', 'last_name', 'email'],
    CustomerUserSearchFields => ['login', 'last_name', 'customer_id'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['email'],
    CustomerUserNameFields => ['title','first_name','last_name'],
    CustomerUserEmailUniqCheck => 1,
#    # show not own tickets in customer panel, CompanyTickets
#    CustomerUserExcludePrimaryCustomerID => 0,
#    # generate auto logins
#    AutoLoginCreation => 0,
#    AutoLoginCreationPrefix => 'auto',
#    # admin can change customer preferences
#    AdminSetPreferences => 1,
#    # cache time to live in sec. - cache any database queries
#    CacheTTL => 0,
#    # just a read only source
#    ReadOnly => 1,
    Map => [
        # note: Login, Email and CustomerID needed!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
        [ 'UserTitle',      'Title',      'title',      1, 0, 'var', '', 0 ],
        [ 'UserFirstname',  'Firstname',  'first_name', 1, 1, 'var', '', 0 ],
        [ 'UserLastname',   'Lastname',   'last_name',  1, 1, 'var', '', 0 ],
        [ 'UserLogin',      'Username',   'login',      1, 1, 'var', '', 0 ],
        [ 'UserPassword',   'Password',   'pw',         0, 0, 'var', '', 0 ],
        [ 'UserEmail',      'Email',      'email',      1, 1, 'var', '', 0 ],
#        [ 'UserEmail',      Translatable('Email'), 'email',           1, 1, 'var', '[% Env("CGIHandle") %]?Action=AgentTicketCompose;ResponseID=1;TicketID=[% Data.TicketID | uri %];ArticleID=[% Data.ArticleID | uri %]', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
        [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
#        [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
        [ 'UserPhone',        'Phone',       'phone',        1, 0, 'var', '', 0 ],
        [ 'UserFax',          'Fax',         'fax',          1, 0, 'var', '', 0 ],
        [ 'UserMobile',       'Mobile',      'mobile',       1, 0, 'var', '', 0 ],
        [ 'UserStreet',       'Street',      'street',       1, 0, 'var', '', 0 ],
        [ 'UserZip',          'Zip',         'zip',          1, 0, 'var', '', 0 ],
        [ 'UserCity',         'City',        'city',         1, 0, 'var', '', 0 ],
        [ 'UserCountry',      'Country',     'country',      1, 0, 'var', '', 0 ],
        [ 'UserComment',      'Comment',     'comments',     1, 0, 'var', '', 0 ],
        [ 'ValidID',          'Valid',       'valid_id',     0, 1, 'int', '', 0 ],

        # Dynamic field example
#        [ 'DynamicField_Name_X', undef, 'Name_X', 0, 0, 'dynamic_field', undef, 0, undef, undef, ],
    ],
    # default selections
    Selections => {
        UserTitle => {
            'Mr.' => 'Mr.',
            'Mrs.' => 'Mrs.',
        },
    },
};
#------------------------------------------------------------------------------------------------------------------------------#
#                                                     Firma Ende                                                               #
#------------------------------------------------------------------------------------------------------------------------------#
######################################################################################################################################ENDE DER BENUTZERDEFINIERTEN KONFIG###########
    $Self->{LogModule}          = 'Kernel::System::Log::File';
    $Self->{LogModule::LogFile} = '/var/log/otrs.log';
# $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 base qw(Kernel::Config::Defaults);

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

1;
EDIT: Achja, mit dieser config bekomme ich keine Fehlermeldungen mehr im logfile (otrs.log und apachelog), aber es funktioniert immer noch nicht.
Version: OTRS::ITSM 5s 5.0.18
Additional Packages: DynamicFieldITSMConfigItem
OS: Ubuntu 16.04
albsie
Znuny newbie
Posts: 9
Joined: 20 Dec 2016, 14:11
Znuny Version: 5.0.18

Re: Kundenlogin nicht möglich mit LDAP

Post by albsie »

Problem gelöst. Wie so oft war ein trivialer Fehler Schuld.
Nach dem Neustart des LDAP-Servers klappt die Authentifizierung.
Version: OTRS::ITSM 5s 5.0.18
Additional Packages: DynamicFieldITSMConfigItem
OS: Ubuntu 16.04
Post Reply