I have fresh install OTRS 5.0.23-01 over CentOS 7.
More than two weeks trying to set up LDAP auth.
I tried official documentation (which incorrect ?) and other resources, but no luck.
When i login customer.pl or index.pl with AD user or local user i get message " Login failed! Your user name or password was entered incorrectly. "
In /var/log/messages next events:
"OTRS OTRS-CGI-77[27661]: [Error][Kernel::System::User::UserLookup][Line:930]: No UserID found for 'Testuser'!"
Active Directory on MS Windows Server 2012R2
I'm in the dark about what to do. Please, help me

Below my Config.pm
# LDAP Agent Auth Backend
$Self->{'DefaultCharset'} = 'utf-8';
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'dc1.mycompany.ru';
$Self->{'AuthModule::LDAP::BaseDN'} = 'OU=OTRS,DC=mycompany,DC=ru';
$Self->{'AuthModule::LDAP::UID'} = 'sn';
$Self->{'AuthModule::LDAP::GroupDN'} = 'CN=OTRSagents,OU=OTRS,DC=mycompany,DC=ru';
$Self->{'AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'CN=otrs-admin,OU=OTRS,DC=mycompany,DC=ru';
$Self->{'AuthModule::LDAP::SearchUserPw'} = '123456';
$Self->{'AuthModule::LDAP::AlwaysFilter'} = '';
$Self->{'AuthModule::LDAP::Charset'} = 'utf-8';
$Self->{'AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
sscope => 'sub'
};
# Sync LDAP and local DB
#$Self->{'AuthModule::UseSyncBackend'} = 'AuthSyncBackend';
$Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
$Self->{'AuthSyncModule::LDAP::Host'} = 'dc1.mycompany.ru';
$Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=mycompany,dc=ru';
$Self->{'AuthSyncModule::LDAP::UID'} = 'sn';
#$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'otrs-admin@mycompany.ru';
$Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'CN=otrs-admin,OU=OTRS,DC=mycompany,DC=ru';
$Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '123456';
$Self->{'AuthSyncModule::LDAP::AlwaysFilter'} = '';
$Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
#BD>LDAP
UserFirstname => 'givenName',
UserLastname => 'sn',
UserEmail => 'mail',
};
$Self->{'AuthSyncModule::LDAP::Charset'} = 'utf-8';
$Self->{'AuthSyncModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};
# AuthSyncModule::LDAP::UserSyncInitialGroups
# (sync following group with rw permission after initial create of first agent
# login)
$Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
'users', 'admin',
];
# LDAP Customer Auth Backend
$Self->{Customeruser} = {
Name => 'LDAP Data Source',
Module => 'Kernel::System::Customeruser::LDAP',
Params => {
Host => 'dc1.mycompany.ru',
BaseDN => 'DC=mycompany,DC=ru',
SSCOPE => 'sub',
UserDN =>'otrs-admin@mycompany.ru',
UserPw => '123456',
# Below string means that All Users and not disabled users
AlwaysFilter => '(&(samAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',
SourceCharset => 'utf-8',
DestCharset => 'utf-8',
Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
CustomerKey => 'sAMAccountName',
CustomerID => 'mail',
CustomeruserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomeruserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomeruserSearchPrefix => '',
CustomeruserSearchSuffix => '*',
CustomeruserSearchListLimit => 10000,
CustomeruserPostMasterSearchFields => ['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' ],
],
};
# Customer Auth LDAP
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'dc1.mycompany.ru';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=mycompany,dc=ru';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sn';
#$Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'CN=Domain Users,OU=Users,dc=mycompany,dc=ru';
$Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';
# for non ldap posixGroups objectclass (full user dn)
#$Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'CN=otrs-admin,OU=OTRS,DC=mycompany,DC=ru';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '123456';
$Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '';
$Self->{'Customer::AuthModule::LDAP::Params'} = {
port => 389,
timeout => 120,
async => 0,
version => 3,
};