LDAP Anbindung

Hilfe zu Znuny Problemen aller Art
Locked
Lars
Znuny newbie
Posts: 5
Joined: 29 Jul 2010, 09:06
Znuny Version: 2.4.7

LDAP Anbindung

Post by Lars »

Hallo Zusammen,

ich hab bis jetzt schon massen an Threads durchgelesen und noch mehr an Beispiel Config.pm ausprobiert.
Leider hat bis jetzt noch keines funktioniert.
kann mir bitte jemand hier eine laufende Config posten das ich diese dann nutzen kann? bzw anpassen kann?

besten dank
Lars
Last edited by Lars on 29 Jul 2010, 16:35, edited 1 time in total.
OTRS: 2.4.7
Windows 2008 R2
MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: LDAP Anbindung

Post by jojo »

Hallo,

erklär erstmal was Du genau machen willst.

Per LDAP lassen sich 3 unterschiedliche Bereiche abdecken:

- Agenten Authentifizierung (optional mit Daten Sync und Berechtigungszuweisung)
- Kunden Daten "anzapfen"
- Kunden Authentifizierung

Jeder dieser Bereiche ist eine eigenständige Konfiguration.

Was für ein LDAP wird überhaupt benutzt? Welche Fehler treten überhaupt auf? Hast Du Ahnung von LDAP Strukturen?
"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
Lars
Znuny newbie
Posts: 5
Joined: 29 Jul 2010, 09:06
Znuny Version: 2.4.7

Re: LDAP Anbindung

Post by Lars »

Hallo,

also ich möchte meinen User aus dem AD den zugriff ermöglichen Tickets zu erstellen die dann von uns Administratoren bearbeitet werden können.
Die sollen sich über das Interface anmelden und ihre Tickets absetzten.
thats it.

gruss Lars
OTRS: 2.4.7
Windows 2008 R2
MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: LDAP Anbindung

Post by jojo »

D.h. Du musst CustomerUser und CustomerAuth per LDAP ermöglichen. Dazu gibt es eigentlich mehr als ausreichend funktionierende Beispiele hier...
"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
Lars
Znuny newbie
Posts: 5
Joined: 29 Jul 2010, 09:06
Znuny Version: 2.4.7

Re: LDAP Anbindung

Post by Lars »

Hallo zusammen,

ok, ich hab hier nun die Beispiel Config aus dem Handbuch genommen:

Code: Select all

 # Start of Example Config
  $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
  $Self->{'AuthModule::LDAP::Host'} = 'Meine IP';
  $Self->{'AuthModule::LDAP::BaseDN'} = 'DC=Domain,DC=LOCAL';
  $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
  $Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=OTRS_admin,OU=OTRS,DC=Domain,DC=local';
  $Self->{'AuthModule::LDAP::SearchUserPw'} = 'Passwort';


  # 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'} = 'Meine IP';
  $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'DC=Domain,DC=local';
  $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';




	
    # CustomerUser
    # (customer user ldap backend and settings)
    $Self->{CustomerUser} = {
        Name => 'LDAP Datenquelle',
        Module => 'Kernel::System::CustomerUser::LDAP',
        Params => {
            # ldap host
            Host => 'Meine IP',
            # ldap base dn
            BaseDN => 'DC=Domain,DC=LOCAL',
            # 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=OTRS,DC=Domain,DC=local',
            UserPw => 'Passwort',
            # in case you want to add always one filter to each ldap query, use
            # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
            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 not 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-link, readonly
#            [ '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 ],
#            [ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
#            [ 'UserComment',    'Comment',    'description',     1, 0, 'var', '', 0 ],
        ],
    };
ich kann mich zwar mit dem wie im Handbuch beschriebenen User anmelden wo in der Lokalen DB vom OTRS drinnen ist, aber das wars auch schon.
Die Agenten kann ich von Hand anlegen, das ist ja ok.
Wenn ich meine Kunden anschauen möchte, sehe ich keine, bzw. finde auch keine wenn ich danach suche.

Wenn ich mich als Kunde anmelden möchte, kommt folgender Fehler im Log:

[Tue Aug 3 11:41:20 2010][Error][Kernel::System::CustomerAuth::LDAP::Auth][193] First bind failed! 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 525, vece

kann mir da war weiter helfen?

Danke
Gruss Lars
OTRS: 2.4.7
Windows 2008 R2
MySQL
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: LDAP Anbindung

Post by jojo »

Benutzername oder Passwort des Bind Users sind falsch.
"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
Lars
Znuny newbie
Posts: 5
Joined: 29 Jul 2010, 09:06
Znuny Version: 2.4.7

Re: LDAP Anbindung

Post by Lars »

Hallo jojo,

mit Bind User meinst du der Kunde selber oder der otrs_admin ?
wenn ich mich als Agent Anmelde klappts.

ich hab in manch anderen Configs gesehen das dort noch ein Pfad vom Activ Directory angegeben werden muss, aus der er sich die User/Kunden holt.
Der geht mir irgentwie ab bei meiner Konfig.

Gruss Lars
OTRS: 2.4.7
Windows 2008 R2
MySQL
Lars
Znuny newbie
Posts: 5
Joined: 29 Jul 2010, 09:06
Znuny Version: 2.4.7

Re: LDAP Anbindung

Post by Lars »

Hab mal Testhalber noch das

Code: Select all

$Self->{'Customer::AuthModule::LDAP::GroupDN'} =  'OU=ORG,DC=Domain,DC=local';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} =  'CN=OTRS_admin,OU=OTRS,DC=Domain,DC=local';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} =  'PlastonOTRS2010';
direkt unter:

# 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'} = 'Meine IP';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'DC=Domain,DC=local';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';

eingefügt.
Nun bekomme ich folgenden Fehler wenn ich mich als Kunde anmelden möchte:

[Wed Aug 4 10:23:21 2010][Notice][Kernel::System::CustomerAuth::LDAP::Auth] CustomerUser: OTRS_admin@Domain.local authentication failed, no LDAP entry found!BaseDN='DC=Domain,DC=local', Filter='(sAMAccountName=OTRS_admin@Domain.local)', (REMOTE_ADDR: 127.0.0.1).

bin ich da noch auf dem richtigem Weg oder ist der Part ganz falsch?
OTRS: 2.4.7
Windows 2008 R2
MySQL
lendrod
Znuny newbie
Posts: 12
Joined: 25 Oct 2010, 17:37
Znuny Version: 5.0.1

Re: LDAP Anbindung

Post by lendrod »

Hallo,

ich habe dieses Thema mal ausgegraben und muss sagen das ich auch gerne eine Anleitung hätte wie ich wo was einfügen muss.
Das Thema scheint ja nicht gerade einfach zu sein.

Ich habe eine SBS2008 Domain Struktur:

golf.local
der user der dort was auslesen dürfte wäre dann
netzadmin / XXXXXX
Und die ip vom SBS ist
192.168.5.1
Die USer die sich im Ticketsystem anmelden dürfen um Tickets zu schreiben wären
Domän-User

Das sind ja so die wichtigsten Eckpunkte die wichtigs ind hoffe ich.

Wo muss ich nun was eintragen?
HowTo oder sowas wäre schon sehr nice wenn es das gibt
boris
Znuny wizard
Posts: 554
Joined: 22 Feb 2010, 18:27
Znuny Version: 3.0.4

Re: LDAP Anbindung

Post by boris »

Hi,

bei mir funktioniert es so:
http://forums.otrs.org/viewtopic.php?f=17&t=6196

Einer der Knackpunkte war bei mir eine falsch SearchUserDN. Sowas wie
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=OTRS_admin,OU=OTRS,DC=Domain,DC=local';
hat bei mir nicht funktionirt.
Als SearchUserDN hab ich: 'binduser@domäne.local'

Dann gehst
Produktiv:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL

Test:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL
Locked