Problem: Cannot login to OTRS using an AD account - 'Login failed! Your username or password was entered incorrectly'
I have followed several KB's and still can't seem to get this to work, here is the snippet from my config.pm file;
Code: Select all
# This is an example configuration for using an MS AD backend
$Self->{'AuthModule1'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host1'} = 'localhost';
$Self->{'AuthModule::LDAP::BaseDN1'} = 'dc=companyname,dc=local';
$Self->{'AuthModule::LDAP::UID1'} = 'sAMAccountName';
# Check if the user is allowed to auth in a posixGroup
# (e. g. user needs to be in a group OTRSAgents to use otrs)
$Self->{'AuthModule::LDAP::GroupDN1'} = 'CN=OTRSAgents,OU=Security,OU=Groups,OU=Users,OU=Head Office,DC=companyname,DC=local';
$Self->{'AuthModule::LDAP::AccessAttr1'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr1'} = 'DN';
# Bind credentials to log into AD
$Self->{'AuthModule::LDAP::SearchUserDN1'} = 'CN=OTRS,OU=System Accounts,OU=IT,OU=Users,OU=Head Office,DC=companyname,DC=local';
$Self->{'AuthModule::LDAP::SearchUserPw1'} = 'Welcome1234!';
# 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'} = '';
# in case you want to add a suffix to each login name, then
# you can use this option. e. g. user just want to use user but
# in your ldap directory exists user@domain.
#$Self->{'AuthModule::LDAP::UserSuffix'} = '';
# 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->{'AuthSyncModule1'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host1'} = 'localhost';
$Self->{'AuthSyncModule::LDAP::BaseDN1'} = 'dc=companyname, dc=local';
$Self->{'AuthSyncModule::LDAP::UID1'} = 'sAMAccountName';
$Self->{'AuthSyncModule::LDAP::SearchUserDN1'} = 'CN=OTRS,OU=System Accounts,OU=IT,OU=Users,OU=Head Office,DC=companyname,DC=local';
$Self->{'AuthSyncModule::LDAP::SearchUserPw1'} = 'Welcome1234!';
$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',
];