Keine "Passwort vergessen" Funktion nach LDAP-Anbindung

Hilfe zu Znuny Problemen aller Art
Locked
fatalerror15
Znuny newbie
Posts: 6
Joined: 18 May 2010, 09:05
Znuny Version: 2.4.7

Keine "Passwort vergessen" Funktion nach LDAP-Anbindung

Post by fatalerror15 »

Hallo,

wir sind gerade dabei unser OTRS-System einzurichten und Produktiv zu setzen. Bis jetzt verlief die Konfiguration ganz gut und intuitiv. Aber jetzt haben wir ein Problem.

Nachdem die Anbindung die Windows 2003 AD Struktur eingerichtet wurde, wird weder in der index.pl noch in der costumer.pl ein "Passwort vergessen" Link angezeigt.
Es gibt zwei Backands an denen sich die "Kunden" Authentifizieren können. Das LDAP und die OTRS-Datenbank. Die Kennwörter im LDAP können natürlich nicht geändert werden. Weil der Bind-User ja nur Lesende rechte hat. In dem Falle sollte dann eventuell eine entsprechende Meldung erscheinen oder vielleicht sofort ein entsprechendes Ticket eröffnet werden. Aber für externe Kunden, die in der Datenbank angelegt sind, sollte dieser Link doch ordentlich funktionieren?!?

Der Parameter: "$Self->{CustomerPanelLostPassword} = 1;" zieht irgendwie nicht.

Hier ist meine Config.pm:

Code: Select all

# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.21 2009/02/16 12:01:43 tr 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;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

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


  # Start of Dimmys Config
  
  	
    # --------------------------------------------------- #
    #                                                     #
    #             Start of config options!!!              #
    #                CustomerPanel stuff                  #
    #                                                     #
    # --------------------------------------------------- #

    # SessionName
    # (Name of the session key. E. g. Session, SessionID, OTRS)
    $Self->{CustomerPanelSessionName} = 'CSID';

    # CustomerPanelUserID
    # (The customer panel db-uid.) [default: 1]
    $Self->{CustomerPanelUserID} = 1;

    # CustomerGroupSupport (0 = compat. to OTRS 1.1 or lower)
    # (if this is 1, the you need to set the group <-> customer user
    # relations! http://host/otrs/index.pl?Action=AdminCustomerUserGroup
    # otherway, each user is ro/rw in each group!)
    $Self->{CustomerGroupSupport} = 0;

    # CustomerGroupAlwaysGroups
    # (if CustomerGroupSupport is true and you don't want to manage
    # each customer user for this groups, then put the groups
    # for all customer user in there)
    $Self->{CustomerGroupAlwaysGroups} = [ 'users', 'info' ];

    # show online agents
#    $Self->{'CustomerFrontend::NotifyModule'}->{'1-ShowAgentOnline'} = {
#        Module      => 'Kernel::Output::HTML::NotificationAgentOnline',
#        ShowEmail   => 1,
#        IdleMinutes => 60,
#    };

    # --------------------------------------------------- #
    # login and logout settings                           #
    # --------------------------------------------------- #
    # CustomerPanelLoginURL
    # (If this is anything other than '', then it is assumed to be the
    # URL of an alternate login screen which will be used in place of
    # the default one.)
#    $Self->{CustomerPanelLoginURL} = '';
#    $Self->{CustomerPanelLoginURL} = 'http://host.example.com/cgi-bin/login.pl';

    # CustomerPanelLogoutURL
    # (If this is anything other than '', it is assumed to be the URL
    # of an alternate logout page which users will be sent to when they
    # logout.)
#    $Self->{CustomerPanelLogoutURL} = '';
#    $Self->{CustomerPanelLogoutURL} = 'http://host.example.com/cgi-bin/login.pl';

    # CustomerPanelPreApplicationModule
    # (Used for every request, if defined, the PreRun() function of
    # this module will be used. This interface use useful to check
    # some user options or to redirect not accept new application
    # news)
#    $Self->{CustomerPanelPreApplicationModule}->{CustomerAccept} = 'Kernel::Modules::CustomerAccept';
    # Kernel::Modules::CustomerAccept check key, if this user preferences key
    # is true, then the message is already accepted
#    $Self->{'CustomerPanel::InfoKey'} = 'CustomerAccept1';
    # shown InfoFile located under Kernel/Output/HTML/Standard/CustomerAccept.dtl
#    $Self->{'CustomerPanel::InfoFile'} = 'CustomerAccept';

    # CustomerPanelLostPassword
    # (use lost passowrd feature)
    $Self->{CustomerPanelLostPassword} = 1;

    # CustomerPanelCreateAccount
    # (use create cutomer account self feature)
    $Self->{CustomerPanelCreateAccount} = 1;

    # --------------------------------------------------- #
    # notification email about new password               #
    # --------------------------------------------------- #
    $Self->{CustomerPanelSubjectLostPassword} = 'New OTRS Password!';
    $Self->{CustomerPanelBodyLostPassword}    = "
Hi <OTRS_USERFIRSTNAME>,

you or someone impersonating you has requested to change your OTRS
password.

New Password: <OTRS_NEWPW>

<OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl

Your OTRS Notification Master
";

    # --------------------------------------------------- #
    # notification email about new account                #
    # --------------------------------------------------- #
    $Self->{CustomerPanelSubjectNewAccount} = 'New OTRS Account!';
    $Self->{CustomerPanelBodyNewAccount}    = "
Hi <OTRS_USERFIRSTNAME>,

you or someone impersonating you has created a new OTRS account for
you (<OTRS_USERFIRSTNAME> <OTRS_USERLASTNAME>).

Login: <OTRS_USERLOGIN>
Password: <OTRS_USERPASSWORD>

<OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl

Your OTRS Notification Master
";


    # --------------------------------------------------- #
    #                                                     #
    #             Start of config options!!!              #
    #                Authentication stuff                 #
    #                                                     #
    # --------------------------------------------------- #

    $Self->{'DefaultCharset'} = 'utf-8';

    #---------------------------------------------------- #
    # Auth against Customer DB
    # ---------------------------------------------------- #

    $Self->{'AuthModule1'}  = 'Kernel::System::Auth::DB';

    # ========================================================= #
    # LDAP Settings for user authentication
    # ========================================================= #

    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'dc.examble.com';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'DC=examble,DC=com';
    $Self->{'AuthModule::LDAP::UID'} = 'uid';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=Otrs.Service,OU=Applications Miscellaneous,OU=Services,DC=examble,DC=com';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'xXxXxXxX';
    $Self->{'AuthModule::LDAP::AlwaysFilter'} = '(objectclass=user)'; # <--
    $Self->{'AuthModule::LDAP::Params'} = {
       port => 389,
       timeout => 120, #--> activate LDAP 120,
       async => 0,
       version => 3,
    };
    $Self->{UserSyncLDAPGroups} = ['user',];

    # ==================================================== #
    # ----  LDAP/DB Agent Configuration settings ------ #
    # ==================================================== #
	
	# Parameter wurde erweitert von maibaum
    # Wird ben igt, damit Name in Agentliste angezeigt wird
    $Self->{DatabaseUserTableUserName} = 'last_name';

    # 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::BaseDN'} = 'OU=Admins,DC=examble,DC=com';
	$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=Otrs.Service,OU=Applications Miscellaneous,OU=Services,DC=examble,DC=com';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'xXxXxXxX';


    # Parameter wurde erweiter von Michael Teuber
    # Pruefen ob ADS-User Berechtigt ist sich als OTRS-Agent anzumelden
    # 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=dl_OTRSAgentsNK,ou=PERMGROUPS,ou=BER_E,ou=Standard,ou=Neunkirchen,dc=xyz,dc=com';
    #$Self->{'AuthModule::LDAP::GroupDN'} = 'OTRSAgentsNK';
    #$Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';

    $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';

    #$Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
    # $Self->{'AuthModule::LDAP::UserAttr'} = 'member';

    $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

	
	
	
    # ==================================================== #
    # ----  LDAP/DB Customer Configuration settings ------ #
    # ==================================================== #
 
    # CustomerUser
    # (customer user database backend and settings)
    $Self->{CustomerUser} = {
        Name   => 'Database Backend',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
            Table => 'customer_user',
        },
        # customer uniq id
        CustomerKey => 'login',

        # customer #
        CustomerID             => 'customer_id',
        CustomerValid          => 'valid_id',
        CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],
        CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
        CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ],
        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '*',
        CustomerUserSearchListLimit => 250,
        CustomerUserPostMasterSearchFields => ['email'],
        CustomerUserNameFields => [ 'salutation', 'first_name', 'last_name' ],
        #CustomerUserEmailUniqCheck => 1,##

        # show now own tickets in customer panel, CompanyTickets
        #CustomerUserExcludePrimaryCustomerID => 0,
        # generate auto logins
        #AutoLoginCreation => 0,
        # generate auto login prefix
        #AutoLoginCreationPrefix => 'auto',
        # admin can change customer preferences
        #AdminSetPreferences => 1,
        # use customer company support (reference to company, See CustomerCompany settings)
        #CustomerCompanySupport => 1,
        # cache time to life in sec. - cache any database queris
        #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-[ 'UserSalutation', 'Salutation', 'salutation', 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', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?[ '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 ],
			],

    };

# ===================================================
# LDAP Customer User Authentication [WF] 
# ===================================================

    $Self->{CustomerUser1} = {
        Name => 'Active Directory',
        Module => 'Kernel::System::CustomerUser::LDAP',
        Params => {
            Host => 'dc.examble.com',
            BaseDN => 'DC=examble,DC=com',
            SSCOPE => 'sub',
            UserDN => 'CN=Otrs.Service,OU=Applications Miscellaneous,OU=Services,DC=examble,DC=com',
            UserPw => 'xXxXxXxX',
            AlwaysFilter => '(objectclass=user)',
	    DestCharset => 'iso-8859-1',
	    SourceCharset => 'utf-8',
            Params => {
                port => 389,
                timeout => 120,
                async => 0,
                version => 3,
            },
        },
        CustomerKey => 'sAMAccountName',
        CustomerID => 'mail',
        CustomerUserListFields => ['cn', 'mail'],
        CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
        CustomerUserSearchListLimit => 250,
        CustomerUserPostMasterSearchFields => ['mail'],
        CustomerUserNameFields => ['givenname', 'sn'],
        CustomerUserExcludePrimaryCustomerID => 0,
        AdminSetPreferences => 0,
        Map => [
            [ 'UserSalutation', 'Title',      'title',           1, 0,'var', '', 0 ],
            [ 'UserFirstname',  'Firstname',  'givenname',       1, 1,'var', '', 0 ],
            [ 'UserLastname',   'Lastname',   'sn',              1, 1,'var', '', 0 ],
            [ 'UserLogin',      'Username',   'sAMAccountName',  1, 1,'var', '', 0 ],
            [ 'UserEmail',      'Email',      'mail',            1, 1,'var', '', 0 ],
            [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1,'var', '', 0 ],
            [ 'UserPhone',      'Phone',      'telephoneNumber', 1, 0,'var', '', 0 ],
            [ 'UserMobile',     'Mobile',      'mobile', 	 	 1, 0,'var', '', 0 ],
            #[ 'UserAddress',    'Address',    'postaladdress',   1, 0,'var', '', 0 ],
            [ 'UserComment',    'Comment',    'description',     1, 0,'var', '', 0 ],
			[ 'UserFax', 		'Fax', 		  'facsimileTelephoneNumber', 1, 0, 'var', '', 0 ],
			[ 'UserStreet', 	'Street', 	  'streetAddress',   1, 0, 'var', '', 0 ],
			[ 'UserZip', 		'Zip', 		  'postalCode',		 1, 0, 'var', '', 0 ],
			[ 'UserCity', 		'City', 	  'l',   			 1, 0, 'var', '', 0 ],
			[ 'UserCountry', 	'Country', 	  'co', 		     1, 0, 'var', '', 0 ],
			
        ],
    };

 
  # End Dimmys config
  #------------------------------------------------------------------------
#------------------------------------------------------------------------


    # ---------------------------------------------------- #
    # 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/CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'xXxXxXxX';
    # 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};";

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

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

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
    $Self->{'SystemID'} = 20;
    $Self->{'SecureMode'} = 1;
    $Self->{'Organization'} = 'Examble Company';
    $Self->{'LogModule::LogFile'} = '/tmp/otrs.log';
    $Self->{'LogModule'} = 'Kernel::System::Log::SysLog';
    $Self->{'FQDN'} = 'otrs-srv.examble.com';
    $Self->{'DefaultLanguage'} = 'de';
    $Self->{'AdminEmail'} = 'otrs@examble.com';
    $Self->{'DefaultCharset'} = 'utf-8';

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

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use warnings;

use vars qw(@ISA $VERSION);
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.21 $)[1];

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

1;
Ich danke euch für jede Hilfestellung und Tipps...


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

Re: Keine "Passwort vergessen" Funktion nach LDAP-Anbindung

Post by jojo »

Das Verhalten ist so "korrekt"

Am besten schaust Du mal unter bugs.otrs.org ob es einen Bug gibt und mach ggf. einen neuen 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
fatalerror15
Znuny newbie
Posts: 6
Joined: 18 May 2010, 09:05
Znuny Version: 2.4.7

Re: Keine "Passwort vergessen" Funktion nach LDAP-Anbindung

Post by fatalerror15 »

Hi,

ich habe jetzt einen Bug erstellt. (Bug 5368)

Falls dennoch noch jemand eine Idee hat, kann er sich gerne melden.

Ich bin für jede weitere Hilfe dankbar.

Gruß
Fatal
Locked