OTRS mit AD synchronisieren

Hilfe zu OTRS Problemen aller Art
Post Reply
ONSv3n
Znuny newbie
Posts: 5
Joined: 24 Feb 2010, 13:49
Znuny Version: 2.4.6

OTRS mit AD synchronisieren

Post by ONSv3n »

Hey hey..

ich habe da so ein kleines Problem..
Kurz vorab, die Mitarbeiter sind alle in einem Active Directory verzeichnet.
Damit ich nicht jeden User einzeln anlegen muss in OTRS, würde ich OTRS gerne mit dem AD synchronisieren.
Ebenso soll die Authentifizierung darüber laufen.

Ich habe folgendes der config.pm hinzugefügt.. Doch i-wie will es so gar nicht klappen.
Könnt ihr mir weiter helfen?

Eine Grundfrage, die damit sicherlich auch beantwortet werden kann ist, was ist ein Benutzer und was ein Kunden-Benutzer?

Hier erst mal meine Konfiguration:

Code: Select all

# LDAP Authentifizierung
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = pbfdom001.domain.de';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=de';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
 
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'cn=otrs_admin,ou=Service_Batch,dc=domain,dc=de';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'XXXXXX';
 
 
   # This is an example configuration for an LDAP auth. backend.
   # (take care that Net::LDAP is installed!)
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'pbfdom001.domain.de';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=pbf_pc,ou=pbf_hw,dc=domain,dc=de';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
 
   # The following is valid but would only be necessary if the
   # anonymous user do NOT have permission to read from the LDAP tree
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=otrs_admin,ou=Service_Batch,dc=domain,dc=de';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'XXXXXX';

# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser} = {
Name => ’LDAP Datenquelle’,
Module => ’Kernel::System::CustomerUser::LDAP’,
Params => {
# ldap host
Host => ’pbfdom001.domain.de’,

# ldap base dn
BaseDN => ’dc=domain,dc=de’,

# search scope (one|sub)
SSCOPE => ’sub’,

# # The following is valid but would only be necessary if the
# # anonymous user does NOT have permission to read from the LDAP tree
UserDN => ´cn=otrs_admin,ou=Service_Batch,dc=domain,dc=de´,
UserPw => ´XXXXXX´,

# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => ’(mail=*)’ or AlwaysFilter => ’(objectclass=AlwaysFilter => ´´,
# if your frontend is e. g. iso-8859-1 and the charset of your
# ldap server is utf-8, use this options (if not, ignore it)
# SourceCharset => ’utf-8’,
# DestCharset => ’iso-8859-1’,
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
# customer uniq id
CustomerKey => ’uid’,

# customer #
CustomerID => ’mail’,
CustomerUserListFields => [’cn’, ’mail’],
CustomerUserSearchFields => [’uid’, ’cn’, ’mail’],
CustomerUserSearchPrefix => ´´,
CustomerUserSearchSuffix => ’*’,
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => [’mail’],
CustomerUserNameFields => [’givenname’, ’sn’],

# show now own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,

# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => ’(!(description=gesperrt))’,
# admin can’t change customer preferences
AdminSetPreferences => 0,

# # cache time to life in sec. - cache any database queris
# CacheTTL => 0,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-[ ’UserSalutation’, ’Title’, ’title’, 1, 0, ’var’, ´´, 0 ],
[ ’UserFirstname’, ’Firstname’, ’givenname’, 1, 1, ’var’, ´´, 0 ],
[ ’UserLastname’, ’Lastname’, ’sn’, 1, 1, ’var’, ´´, 0 ],
[ ’UserLogin’, ’Username’, ’uid’, 1, 1, ’var’, ´´, 0 ],
[ ’UserEmail’, ’Email’, ’mail’, 1, 1, ’var’, ´´, 0 ],
[ ’UserCustomerID’, ’CustomerID’, ’mail’, 0, 1, ’var’, ´´, 0 ],
# [ ’UserCustomerIDs’, ’CustomerIDs’, ’second_customer_ids’, 1, 0, ’var’, ´´, 0 ],
[ ’UserPhone’, ’Phone’, ’telephonenumber’, 1, 0, ’var’, ´´, 0 ],
127
Kapitel 11. Einbinden externer Back-ends
[ ’UserAddress’, ’Address’, ’postaladdress’, 1, 0, ’var’, ´´, 0 ],
[ ’UserComment’, ’Comment’, ’description’, 1, 0, ’var’, ´´, 0 ],
],
};
Installation als komplettpaket - OTRS 2.4.6 /Windows2k3
Joyner
Znuny expert
Posts: 185
Joined: 08 Feb 2008, 14:49
Znuny Version: 2.2.8
Location: Berlin

OTRS mit AD synchronisieren

Post by Joyner »

Hallo,

zunächst fülle doch bitte deine Profil-Signatur mit OTRS Version, OS etc. aus.
ONSv3n wrote: Eine Grundfrage, die damit sicherlich auch beantwortet werden kann ist, was ist ein Benutzer und was ein Kunden-Benutzer?
Benutzer sind die Agent, die Ticket bearbeiten können und sich über die index.pl einloggen können.
Kunden-Benutzer sind die CustomerUser, also die Kunden, denen tickets zugewiesen werden.

Hier erst mal meine Konfiguration:

Code: Select all

[...]
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-[ ’UserSalutation’, ’Title’, ’title’, 1, 0, ’var’, ´´, 0 ],
[...]
Hier mal hinter "http-" einen Zeilenumbruch machen.

Code: Select all

[...]
127
Kapitel 11. Einbinden externer Back-ends
[...]
Die Zeilen mal löschen.

mfg
Sebastian
Produktiv: OTRS 2.4.7, CiCS 3.1.5, Eigenentwicklungen
β-Testing/Mirror: OTRS 2.4.7, ITSM 2.0.2, CiCS(::ITSM) 3.1.5 (2.1.6), Eigenentwicklungen OS: Win2003, XAMPP, Apache2.2/MySQL 5, Trac/SVN
ONSv3n
Znuny newbie
Posts: 5
Joined: 24 Feb 2010, 13:49
Znuny Version: 2.4.6

OTRS mit AD synchronisieren

Post by ONSv3n »

Wenn ich nur diese Änderungen vornehme, bekomme ich folgendes als Fehler beim aufrufen von OTRS:
########################

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@somenet.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Installation als komplettpaket - OTRS 2.4.6 /Windows2k3
ONSv3n
Znuny newbie
Posts: 5
Joined: 24 Feb 2010, 13:49
Znuny Version: 2.4.6

OTRS mit AD synchronisieren

Post by ONSv3n »

Das Problem besteht leider noch..
Hat niemand mehr eine Idee?
Installation als komplettpaket - OTRS 2.4.6 /Windows2k3
yetanotheruser
Znuny newbie
Posts: 8
Joined: 23 Feb 2010, 09:58
Znuny Version: 2.4.2

OTRS mit AD synchronisieren

Post by yetanotheruser »

Als kleiner Tipp: Ich würd sowas am Anfang (ich geh mal davon aus dass das der erste Kontakt mit der config.pm war :) ) Schritt für Schritt angehen. Nicht gleich den ganzen Brocken Code reinkopieren, da tust du dir nur unnötig schwer mit der Fehlersuche. Z.B. erstmal die LDAP Abfrage zum Einloggen der Benutzer zum laufen bringen. Dann das nächste angehen.

Ich kopier dir mal die Teile aus meiner config.pm raus. Laut dem ersten Post brauchst du ja nur die Anmeldung der Agenten mit den AD Daten und das Synchronisieren mit der DB.

Code: Select all

 # ---------------------------------------#
    # Anmeldung an Frontend via LDAP #
    # ----------------------------------------#    
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'bsp.domain.loc';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'ou=Firma, ou=Abteilung , dc=domain, dc=loc';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
    # Username / Passwort zum anmelden am AD #
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'Benutzername_mit_AD_Leserechten';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = 'Passwort';    

    # User in die lokale Datenbank schreiben

    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'bsp.domain.loc';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'ou=Firma, ou=Abteilung , dc=domain, dc=loc';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    # Username / Passwort zum anmelden am AD #
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'Benutzername_mit_AD_Leserechten';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'Passwort';     

    # AuthSyncModule::LDAP::UserSyncMap
    # (map if agent should create/synced from LDAP to DB after successful login)
    $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
      # DB -> LDAP
      UserFirstname => 'givenName',
      UserLastname  => 'sn',
      UserEmail     => 'mail',
    };

    # (sync following group with rw permission after initial create of first agent login)
    $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
      'Agent', 'users',
    ];  
OTRS 2.4.2 / WinXP / IIS / MySQL5
ONSv3n
Znuny newbie
Posts: 5
Joined: 24 Feb 2010, 13:49
Znuny Version: 2.4.6

OTRS mit AD synchronisieren

Post by ONSv3n »

Habe mal die obige config genommen.
Kann mich nu auch wieder anmelden mit dem direkt in OTRS angelegten User.
Jedoch können sich die aus dem LDAP nicht anmelden.

Wenn ich in der Admin-config der Oberfläche jedoch die Quelle der User wechseln möchte,
bekomme ich unter Quelle auch nur "Database Backand" angezeigt.

Wo finde ich denn eine LOG datei, die das Anmelden mitloggt? und eventuell den Grund für das erfolglose anmelden ausgibt?
Installation als komplettpaket - OTRS 2.4.6 /Windows2k3
DERvomSEE
Znuny newbie
Posts: 13
Joined: 11 Mar 2010, 12:41
Znuny Version: 2.4.7
Location: Am Bodensee

OTRS mit AD synchronisieren

Post by DERvomSEE »

Hi,
zu einer Lösung berreits gekommen?

zwei stellen an denen du das Login Protokolliert wird.

einmal im OTRS. <OTRSpath>\var\log\otrs.log

und wenns du LDAP benutzen möchtest noch in der Ereignisanzeige deines LDAP Servers..
bei einem ADS z.b solltest du aber dann ncoh die Logstufe anheben..

HKey_local_machine\system\currentControlSet\Services\NTDS\Diagnostigs

da gibts nen eintrag 16 LDAP INterface Events den Wert auf 5 Setzen

siehe -> http://technet.microsoft.com/en-us/libr ... 61809.aspx
"Der Weg ist das Ziel" --- "Warum setzen wir uns dann nicht mit einem Bier daneben und schauen zu?"

Im Aufbau:
OTRS 2.4.7
OS: Win 2k3
DB: MySQL
Post Reply