I create two groups in my AD to split the Agents (Otrs_Agents) from the Costumer (Otrs_Users), if I try to login with a Agents Account works fine, but when I try to login with a customer account fail, because Otrs go to Agents group to search for the customer.
Could you help me on this, please.
This is my settings of LDAP
Agents group= Otrs_Agents
Customer group= Otrs_Users
Ldap Otrs user for read= Otrs
Code: Select all
#Agents Settings
# This is an example configuration for an LDAP auth. backend.
# (take care that Net::LDAP is installed!)
$Self->{AuthModule1} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host1'} = 'dc00.fs.local';
$Self->{'AuthModule::LDAP::BaseDN1'} = 'dc=fs,dc=local';
$Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName';
# Definimos grupo, en el que estar�n los agents de OTRS, si no definimos grupos, todos los users del Active D$ # podran hacer login como agents
# En el caso del ejemplo, necesitar�s crear el grupo otrs_agents y a�adir a �l los users que quieres que hagan
$Self->{'AuthModule::LDAP::GroupDN1'} = 'CN=Otrs_Agents,OU=Grupos,OU=users,DC=fs,DC=local';
#$Self->{'AuthModule::LDAP::SearchUserDN1'} = 'CN=Otrs_agents,OU=Grupos,OU=users,DC=fs,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
# The following is valid but would only be necessary if the
# anonymous user do NOT have permission to read from the LDAP tree
$Self->{'AuthModule::LDAP::SearchUserDN1'} = 'CN=Otrs,OU=SM,OU=users,DC=fs,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw1'} = 'passwords';
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
$Self->{'AuthModule::LDAP::Params1'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
inet4 => 1,
};
# --------------------------------------------------- #
# authentication sync settings #
# (enable agent data sync. after succsessful #
# authentication) #
# --------------------------------------------------- #
# This is an example configuration for an LDAP auth sync. backend.
# (take care that Net::LDAP is installed!)
$Self->{AuthSyncModule1} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host1'} = 'clsandc00.fs.local';
$Self->{'AuthSyncModule::LDAP::BaseDN1'} = 'dc=fs,dc=local';
$Self->{'AuthSyncModule::LDAP::UID1'} = '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->{'AuthSyncModule::LDAP::SearchUserDN1'} = 'CN=Otrs,OU=SM,OU=users,DC=fs,DC=local';
$Self->{'AuthSyncModule::LDAP::SearchUserPw1'} = 'Passwords';
# AuthSyncModule::LDAP::UserSyncMap
# (map if agent should create/synced from LDAP to DB after successful login)
$Self->{'AuthSyncModule::LDAP::UserSyncMap1'} = {
#DB -> LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
# Begin of Customer LDAP configuration
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::ConnectAD';
$Self->{'Customer::AuthModule::ConnectAD::Host'} = 'dc00.fs.local';
$Self->{'Customer::AuthModule::ConnectAD::BaseDN'} = 'dc=fs,dc=local';
$Self->{'Customer::AuthModule::ConnectAD::UID'} = 'sAMAccountName';
# Group membership filtering start
$Self->{'Customer::AuthModule::ConnectAD::GroupDN'} = 'CN=Otrs_users,OU=Grupos,OU=users,DC=fs,DC=local';
$Self->{'Customer::AuthModule::ConnectAD::AccessAttr'} = 'member';
# only Member of this group are allowed to login, erase the commentsymbol(#) to enable filtering
$Self->{'Customer::AuthModule::ConnectAD::SearchUserDN'} = 'CN=Otrs,OU=SM,OU=users,DC=fs,DC=local';
$Self->{'Customer::AuthModule::ConnectAD::SearchUserPw'} = 'Passwords';
$Self->{CustomerUser} = {
Name => 'otrs ldap1',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'dc00.fs.local',
BaseDN => 'dc=fs,dc=local',
SSCOPE => 'sub',
UserDN => 'CN=Otrs,OU=SM,OU=users,DC=fs,DC=local',
UserPw => 'Passwords',
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomerUserListFields => ['givenname', 'sn', 'sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['givenname', 'sn', 'sAMAccountName', 'cn', 'mail'],
CustomerUserPostMasterSearchFields => ['givenname', 'sn', 'mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
#['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'],
],
};
Can I have both type of logint in the same pm file?