LDAP Authentifizierung funkt nicht

Hilfe zu Znuny Problemen aller Art
Locked
dnaontec
Znuny newbie
Posts: 81
Joined: 03 Jul 2014, 16:08
Znuny Version: 5.0.3
Real Name: Deniz

LDAP Authentifizierung funkt nicht

Post by dnaontec »

Hallo zusammen.

Nachdem wir nun auch das OTRS bei uns in der Firma testen, stellen sich uns noch einige Probleme in den Weg.
Eins davon ist die Anbindung ans Active Directory // LDAP-Anbindung.

Zur zeit bekommen wir bei unseren Login-Versuchen nur die Fehlermeldung dass Benutzername oder Passwort falsch eingegeben wurden, sowie folgende Einträge im logfile:

Code: Select all

[Fri Jul 4 10:53:35 2014][Notice][Kernel::System::Auth::LDAP::Auth] User: user@domain.domain.at authentication failed, no LDAP entry found!BaseDN='dc=domain,dc=domain,dc=at', Filter='(sAMAccountName=user@domain.domain.at)', (REMOTE_ADDR: xxx.xxx.xxx.xxx).
wenn der User sowohl im AD, als auch in der DB vom OTRS vorhanden ist.

Code: Select all

[Fri Jul 4 10:53:49 2014][Notice][Kernel::System::Auth::LDAP::Auth] User: user@domain.domain.at authentication failed, no LDAP entry found!BaseDN='dc=domain,dc=domain,dc=at', Filter='(sAMAccountName=user@domain.domain.at)', (REMOTE_ADDR: xxx.xxx.xxx.xxx).
 [Fri Jul 4 10:53:49 2014][Error][Kernel::System::User::UserLookup][834] No UserID found for 'user'!
wenn der user nur im AD, nicht aber in der DB vom OTRS vorhanden ist.


Die kernel/Config.pm welche wir zur Zeit verwenden sieht im entsprechenend Teil so aus:

Code: Select all


# ---------------------------------------------------- #
 # LDAP Settings #
 # ---------------------------------------------------- #
 

$Self->{AuthModule} = 'Kernel::System::Auth::LDAP';
 $Self->{'AuthModule::LDAP::Host'} = 'host.domain.domain.at';
 $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=domain,dc=at';
 $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName'
 $Self->{'AuthModule::LDAP::SearchUserDN'} = 'testotrs@domain.domain.at'
 $Self->{'AuthModule::LDAP::SearchUserPw'} = 'Password';
 

# 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_Agents,ou=OTRS,ou=Domain Benutzer,dc=domain,dc=domain,dc=at';
 $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
 
# for non ldap posixGroups objectclass (with full user dn)
 $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
 
# 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.domain.at';
 
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
 $Self->{'AuthModule::LDAP::Params'} = {
 port => 3268,
 timeout => 120,
 async => 0,
 version => 3,
 };
 

# Enable LDAP Authentication Sync for Agent #
 $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
 $Self->{'AuthSyncModule::LDAP::Host'} = 'host.domain.domain.at';
 $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain,dc=domain,dc=at';
 $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
 $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'memberUid';
 $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'testotrs@domain.domain.at';
 $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Password';

So langsam sind wir nun leider auch mit unserem Latein am Ende, evlt könnt ihr uns ein wenig auf die Sprünge helfen? :)

Danke und LG.
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: LDAP Authentifizierung funkt nicht

Post by wurzel »

Hi,

ich würde Dir empfehlen, mal ganz einfach anzufangen:

lege Dir einen lokalen Agenten in der OTRS DB an mit dem gleichen Username wie er auch im Windows verwendet wird.

Dann nimmst Du erstmal nur den Part:

Code: Select all

 $Self->{AuthModule} = 'Kernel::System::Auth::LDAP';
 $Self->{'AuthModule::LDAP::Host'} = 'host.domain.domain.at';
 $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=domain,dc=at';
 $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName'
 $Self->{'AuthModule::LDAP::SearchUserDN'} = 'testotrs@domain.domain.at'
 $Self->{'AuthModule::LDAP::SearchUserPw'} = 'Password';
Und schaust, ob Du Dich erfolgreich anmelden kannst. Es müsste was von LDAP Auth OK in den Logfiles stehen.
Danach kannst Du Dich an Filter + Gruppen trauen.

Weil z.B.

Code: Select all

$Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid'; 
ist glaube ich nicht korrekt, es müsste member oder nur UID oder so heissen.

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
dnaontec
Znuny newbie
Posts: 81
Joined: 03 Jul 2014, 16:08
Znuny Version: 5.0.3
Real Name: Deniz

Re: LDAP Authentifizierung funkt nicht

Post by dnaontec »

Hi!

Danke für die Antwort.

Wir sind jetzt mit folgender Config.pm unterwegs und das Problem scheint sich gelöst zu haben:

Code: Select all

$Self->{AuthModule} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'host.domain.domain.at';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=domain,dc=at';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';     
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'testotrs@domain.domain.at';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'Password';


    $Self->{'AuthModule::LDAP::GroupDN'} = 'cn=OTRS_Agents,ou=OTRS,ou=Domain Benutzer,dc=domain,dc=domain,dc=at';
    $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
    $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';


    # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
    $Self->{'AuthModule::LDAP::Params'} = {
        port    => 3268,
        timeout => 120,
        async   => 0,
        version => 3,
   };


   # Enable LDAP Authentication Sync for Agent #
        $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
        $Self->{'AuthSyncModule::LDAP::Host'} = 'host.domain.domain.at';
        $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain,dc=domain,dc=at';
        $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
        $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
        $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'testotrs@domain.domain.at';
	$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Password';
User welche sowohl im AD (in der entsprechenden Sicherheitsgruppe), als auch in der DB des OTRS existieren können sich nun am OTRS anmelden - Logfile sieht auch gut aus.

Code: Select all

  $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
Ab 2008er Domänen ist's wohl "member", bei 2003er "memberUID.


Danke für deine Hilfe.

LG
Locked