LDAP works for customers, but not agents?

Moderator: crythias

Locked
hopeitl
Znuny newbie
Posts: 4
Joined: 11 Jul 2011, 16:43
Znuny Version: 3.0.9
Real Name: Abel
Company: Hope International

LDAP works for customers, but not agents?

Post by hopeitl »

I have LDAP setup for customers, and I only want people in the LDAP security group (under "hope.local","HopeInternational","Security Groups") otrsagent to access the agent side of things. Customers works great, but for the life of me, I can't figure out agents. Any help? This is off an Ubuntu 10.04 OTRS 3.0.9 install.

My Config.pm

Code: Select all

####LDAP SETTINGS####
   $Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
   $Self->{'AuthModule::LDAP::Host'} = '192.168.47.6'; 
   $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=hope, dc=local';
   $Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
   $Self->{'AuthModule::LDAP::SearchUserDN'} = 'OTRS';
   $Self->{'AuthModule::LDAP::SearchUserPw'} = 'password';

##Agents##
 $Self->{'AuthModule::LDAP::GroupDN'} = 'cn=otrsagent,ou=HopeInternational,dc=hope,dc=local';
 $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
 $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
 $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';

##Customers##
  $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  $Self->{'Customer::AuthModule::LDAP::Host'} = '192.168.47.6';
  $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=HopeInternational,dc=hope,dc=local';
  $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
  $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'OTRS';
  $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'password';
  $Self->{CustomerUser} = {
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
      Host => '192.168.47.6',
      BaseDN => 'ou=HopeInternational,dc=hope,dc=local',
      SSCOPE => 'sub',
      UserDN => 'OTRS',
      UserPw => 'password',
    },
    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' ],
    ],
  };
####END LDAP SETTINGS####
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: LDAP works for customers, but not agents?

Post by Wolfgangf »

did you create local user accounts for agents - otherwise it will not work
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
hopeitl
Znuny newbie
Posts: 4
Joined: 11 Jul 2011, 16:43
Znuny Version: 3.0.9
Real Name: Abel
Company: Hope International

Re: LDAP works for customers, but not agents?

Post by hopeitl »

Wolfgangf wrote:did you create local user accounts for agents - otherwise it will not work
Explain a little more on the local server (ticketing) or in the AD? I'm a little new to this, and I took this project on before I really knew what I was getting into, sorry :(

I can't have people log in with their AD username as long as their in the otrsagent security group?
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: LDAP works for customers, but not agents?

Post by ferrosti »

Have a look at the manual where it´s about the authentiacation sync settings. Agents need to be in OTRSs internal DB, but they can be synced on the first login automatically.

It goes something like that:

Code: Select all

# UserSyncLDAPMap
$Self->{'UserSyncLDAPMap'} = {
    # DB -> LDAP
    UserFirstname => 'givenName',
    UserLastname => 'sn',
    UserEmail => 'mail',
};
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
Locked