Passwortänderung bei LDAP Authentication

Allgemein Fragen, deutsche News, Ankündigungen & Events zu Znuny
Locked
anonymos10
Znuny newbie
Posts: 6
Joined: 01 Jul 2014, 10:46
Znuny Version: 3.0.6

Passwortänderung bei LDAP Authentication

Post by anonymos10 »

Hallo liebes Forum

Ich habe bei unserer OTRS-Installation eingerichtet, dass sich die Agenten beim AD authentifizieren. Anschliessend werden die User-Infos auf die lokale DB gespeichert. So weit so gut. Funktioniert auch alles soweit. Wie kann ich aber nun einstellen, dass wenn das Passwort beim AD gewechselt wird, sich der User mit dem neuen Passwort einloggen muss? Im Moment muss sich der User immer mit dem Passwort anmelden, mit welchem er sich das erste Mal angemeldet hat. Passwortänderungen beim LDAP-User haben (leider) keine Wirkung auf den OTRS-User

Meine Config

Code: Select all

# 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'} = 'ldap.example.com';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=example,dc=com';
$Self->{'AuthModule::LDAP::UID'} = 'uid';

# 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=otrsallow,ou=posixGroups,dc=example,dc=com';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
# 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'} = '';
$Self->{'AuthModule::LDAP::SearchUserPw'} = '';

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

# defines AuthSyncBackend (AuthSyncModule) for AuthModule
# if this key exists and is empty, there won't be a sync.
# example values: AuthSyncBackend, AuthSyncBackend2
$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';

# agent data sync against ldap
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'ldap://ldap.example.com/';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=otrs, dc=org';
$Self->{'AuthSyncModule::LDAP::UID'} = 'uid';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'uid=sys, ou=user, dc=otrs, dc=org';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'some_pass';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
    # DB -> LDAP
    UserFirstname => 'givenName',
    UserLastname  => 'sn',
    UserEmail     => 'mail',
};
[...]

# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent
# login)
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
    'users',
];


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

Re: Passwortänderung bei LDAP Authentication

Post by jojo »

die Authentifizierung erfolgt ausschliesslich gegenüber dem LDAP, d.h. Du musst nichts am OTRS ändern
"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
anonymos10
Znuny newbie
Posts: 6
Joined: 01 Jul 2014, 10:46
Znuny Version: 3.0.6

Re: Passwortänderung bei LDAP Authentication

Post by anonymos10 »

Weshalb konnte ich mich dann, nach dem ich das Passwort von meinem LDAP-User geändert habe, nicht mehr mit dem neuen Passwort anmelden, sondern musste/konnte mich immer noch mit dem alten Passwort anmelden? Braucht es evlt. ein paar Minuten bis OTRS das checkt?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Passwortänderung bei LDAP Authentication

Post by jojo »

das OTRS prüft beim einloggen nur gegen den LDAP Server, dieser gibt dann OK oder nicht OK. Solltet Ihr mehrere LDAP Server haben kann es natürlich ein moment dauern bis alle syncronisiert sind.

Ein Blick ins Logfile sollte auch hier helfen
"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
anonymos10
Znuny newbie
Posts: 6
Joined: 01 Jul 2014, 10:46
Znuny Version: 3.0.6

Re: Passwortänderung bei LDAP Authentication

Post by anonymos10 »

Okay, nun funktioniert es. Musste den Scheduler starten. Erst dann funktionierte es (?!). Super. Danke für die Hilfe.

Eine Frage habe ich doch noch. Wenn ich mehrere LDAPs anbinde beim OTRS und diese mehrere Domänen haben, ist es ja möglich dass diese den gleichen Benutzernamen haben z.B. test.user (@domain1.com) und test.user (@domain2.com). Hat OTRS ein Problem damit, wenn es mehrere gleiche Benutzernamen gibt? Falls ja, wie löst man das Problem am besten?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Passwortänderung bei LDAP Authentication

Post by jojo »

Der Scheduler hat nichts damit zu tun..

Ein Benutzername muss unique sein, in solchen Fällen am besten den User Principal Name (AD) oder die Mailadresse nutzen
"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
anonymos10
Znuny newbie
Posts: 6
Joined: 01 Jul 2014, 10:46
Znuny Version: 3.0.6

Re: Passwortänderung bei LDAP Authentication

Post by anonymos10 »

jojo wrote:Der Scheduler hat nichts damit zu tun..

Ein Benutzername muss unique sein, in solchen Fällen am besten den User Principal Name (AD) oder die Mailadresse nutzen
Hallo jojo

Vielen Dank für deine Hilfe! Wo müsste ich dann den sAMAccountName überall ändern, dass z.B. die Mailadresse statt der sAMAccountName benutzt werden soll?

Freundliche Grüsse
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: Passwortänderung bei LDAP Authentication

Post by Rooobaaat »

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

auf

$Self->{'AuthModule::LDAP::UserAttr'} = 'mail';
My english is better than your german :P

"Produktiv": OTRS: 5.0.x, OTRS::ITSM 5.0.x
"Testing": OTRS 6 git
OS: Debian 8.0 (Jessie)
Apache2.4.10/MySQL 5.5.41
Locked