LDAP Anbindung Endspurt

Hilfe zu Znuny Problemen aller Art
Locked
boris
Znuny wizard
Posts: 554
Joined: 22 Feb 2010, 18:27
Znuny Version: 3.0.4

LDAP Anbindung Endspurt

Post by boris »

Hi,

ich schon wieder:-)
Die die es in der Mailingliste schon gelesen haben können hier aufhören zu lesen :?

Dank eurer Hilfe und er Mailingliste ist es endlich soweit und meine Config funktioniert.

Jetzt weiss ich aber noch nicht so recht weiter.
Wir haben 4 Domänen gegen die ich Authentifizieren will und verschiedene OUs in den jeweiligen ADs.
Config sieht so aus:

Code: Select all

    # LDAP Customer #
        $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
        $Self->{'Customer::AuthModule::LDAP::Host'} = '10.1.8.16';
        $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'DC=compass,DC=local';
        $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
        $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'otrsldap@compass.local';
        $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'Passwort123';
        $Self->{'Customer::AuthModule::LDAP::Params'} = {
            port => 389,
            timeout => 120,
            async => 0,
            version => 3,
    };

    #LDAP System Users#
        $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
        $Self->{'AuthModule::LDAP::Host'} =  '10.1.8.16';
        $Self->{'AuthModule::LDAP::BaseDN'} =  'OU=Users,DC=compass,DC=local';
        $Self->{'AuthModule::LDAP::UID'} =  'sAMAccountName';
        $Self->{'AuthModule::LDAP::SearchUserDN'} =  'otrsldap@compass.local';
        $Self->{'AuthModule::LDAP::SearchUserPw'} =  'Passwort123';
        $Self->{'AuthModule::LDAP::Params'} =  {
              'async' => '0',
              'timeout' => '120',
              'version' => '3',
              'port' => '389'

};

    # UserSyncLDAPMap

      $Self->{'UserSyncLDAPMap'} =  {
      'UserEmail' => 'mail',
      'UserFirstname' => 'givenName',
      'UserLastname' => 'sn',
      'UserLogin' => 'sAMAccountName'
    };      

    #--------------------------------------#
    # LDAP Konfiguration / Kundendaten #
    #--------------------------------------#
    $Self->{CustomerUser1} = {
    Name => 'LDAP Datenquelle',
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
    Host => '10.1.8.16',
    BaseDN => 'dc=compass,dc=local',
    SSCOPE => 'sub',
    UserDN => 'otrsldap@compass.local',
    UserPw => 'Passwort123',
    },
    CustomerKey => 'sAMAccountName',
    CustomerID => 'mail',
    CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    Map => [
    # note: Login, Email and CustomerID needed!
    # var, frontend, storage, shown, required, storage-type
    [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
    [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
    [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
    [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
    [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
    [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
    # [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
    # [ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
    ],
    };

    
Das ganze brauch ich doch jetzt 4 mal, einmal pro Domäne oder?
Und was ich noch nicht gefunden habe: wie frage ich in einer Domäne verschiedene OUs ab?
Wir haben beispielsweise viele Aussendienstler, jede Region hat Ihre eigene OU.
Ich muss doch in der Config jede OU explicit angeben oder?

Sowas:

Code: Select all

        $Self->{'AuthModule::LDAP::BaseDN'} =  'OU=Users,DC=compass,DC=local';
        $Self->{'AuthModule::LDAP::BaseDN'} =  'OU=Users,OU=RegionX,DC=compass,DC=local';
        $Self->{'AuthModule::LDAP::BaseDN'} =  'OU=Users,OU=RegionY,DC=compass,DC=local';
ist doch falsch oder?


Brauch ich die Cofig dann einmal pro OU und einmal pro Domäne?

Boris
Produktiv:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL

Test:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL
garwen
Znuny expert
Posts: 260
Joined: 03 Feb 2009, 16:51
Znuny Version: 2.4.7

Re: LDAP Anbindung Endspurt

Post by garwen »

Es wird alles durchsucht, was sich unterhalb der BaseDN befindet. Kannst also auch

Code: Select all

$Self->{'AuthModule::LDAP::BaseDN'} =  'DC=compass,DC=local';
angeben und die OUs, die sich darunter befinden, werden ebenfalls durchsucht.
MfG
~Fredy

Produktiv: OTRS 3.0.11/ openSUSE 11.4 / Apache2, MySQL5 / Exchange 2010
boris
Znuny wizard
Posts: 554
Joined: 22 Feb 2010, 18:27
Znuny Version: 3.0.4

Re: LDAP Anbindung Endspurt

Post by boris »

:lol: so einfach kanns sein... auf die Idee wäre ich nicht gekommen!
Danke!
Produktiv:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL

Test:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL
Locked