LDAP Sync von Gruppen und Rollen geht nicht

Hilfe zu OTRS Problemen aller Art
Post Reply
thechonta
Znuny newbie
Posts: 3
Joined: 08 Jun 2017, 17:02
Znuny Version: 5.0.19

LDAP Sync von Gruppen und Rollen geht nicht

Post by thechonta »

Hallo,

#Gelößt
#Diese beiden Zeilen müssen im Synteil drin stehen, sonst wird ein falscher Filter verwendet .
#$Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
#$Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
#Konfig wurde angepasst.

ich habe ein Problem.
Ich habe OTRS mir dem AD verbunden und die Agenten werden beim ersten einloggen auch angelegt.
Das Problem ist ich will nun auch Gruppen oder Rollen zugehöhrigkeit anhand von AD Gruppenzugehöhrigkeit vergeben.
Das klappt leider nicht....
Es funktioniert nur das hinzufügen der Initialgruppe, aber ein Mapping zwischen mitgleidschaft in einer AD-Gruppe zu einer OTRS-Gruppe geht nicht.
Hier meine Konfig, ich hoffe ihr könnt mir sagen wo der Fehler ist.

Code: Select all

# This is an example configuration for using an MS AD backend
    $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
    $Self->{'AuthModule::LDAP::Host'} = 'FQDN-DC';
    $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=domäne,dc=tdl';
    $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';

    # Check if the user is allowed to auth in a posixGroup
    # (e. g. user needs to be in a group OTRS_Agents to use otrs)
    $Self->{'AuthModule::LDAP::GroupDN'} = 'CN=sec_OTRS_users,OU=Sicherheitsgruppen,OU=Groups,DC=domäne,DC=tdl';
    $Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
    $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

    # Bind credentials to log into AD
    $Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=otrs user,OU=Dienst-Konten,OU=Users,DC=domäne,DC=tdl';
    $Self->{'AuthModule::LDAP::SearchUserPw'} = '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)'
    $Self->{'AuthModule::LDAP::AlwaysFilter'} = '';

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

# Now sync data with OTRS DB
    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'fqdn-dc';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domäne,dc=tdl';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=otrs user,OU=Dienst-Konten,OU=Users,DC=domäne,DC=tdl';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'passwort';
    #Anpassung
    $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
    $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
    #Anpassung Ende
    $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',
    ];
        # AuthSyncModule::LDAP::UserSyncGroupsDefinition
    # (If "LDAP" was selected for AuthModule and you want to sync LDAP
    # groups to otrs groups, define the following.)
    $Self->{'AuthSyncModule::LDAP::UserSyncGroupsDefinition'} = {
        # ldap group
        'CN=sec_OTRS_Verwaltung_Berlin,OU=Sicherheitsgruppen,OU=Groups,DC=domäne,DC=tdl' => {
            # otrs group
            'gr_Verwaltung' => {
                # permission
                rw => 1,
                ro => 1,
            },
          },
        'CN=sec_OTRS_move_into_Verwaltung,OU=Sicherheitsgruppen,OU=Groups,DC=domäne,DC=tdl' => {
            'gr_Verwaltung' => {
                move_into => 1,
            },
        }
    };
Die AD Benutzer können sich einloggen, kommen in die Gruppe users als Initialgruppe und das wars.
Weder neue Benutzer noch alte Benutzer bekommen über diese Konfig eine Gruppe zugeweisen, ich muss alles per Hand in OTRS machen...

Ich bin für jeden Wink mit dem Zaunpfal dankbar.

Gruß

Chonta
Post Reply