Sziasztok!
Valamiért napok óta nem tudom összehozni, hogy az OTRS össze legyen kapcsolva az AD-vel.
Van egy "dc" nevű tartományvezérlő az example.hu tartományban,
ill. egy "otrs" nevű user, ami a "Users" OU-ban van.
Ennek a usernek a jelszava "password" és már kínomban domain admint csináltam belőle,
hogy a jogosultságokkal biztosan ne legyen probléma.
Az AD egyébként egy Windows Server 2008 R2 szerveren fut.
A Config.pm-em most így néz ki:
# ---------------------------------------------------- #
# insert your own config settings "here" #
# config settings taken from Kernel/Config/Defaults.pm #
# ---------------------------------------------------- #
# $Self->{SessionUseCookie} = 0;
# $Self->{CheckMXRecord} = 0;
# CustomerUser
# (customer user ldap backend and settings)
$Self->{CustomerUser} = {
Name => 'AD User',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'DC.example.hu',
# ldap base dn
#BaseDN => 'DC=example,DC=hu',
BaseDN => 'DC=example, DC=hu',
# search scope (one|sub)
SSCOPE => 'sub',
# The following is valid but would only be necessary if the
# anonymous user does NOT have permission to read from the LDAP tree
UserDN => 'cn=otrs, ou=Users, dc=example, dc=hu',
UserPw => 'password',
# in case you want to add always one filter to each ldap query, use
# this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
AlwaysFilter => '',
# if the charset of your ldap server is iso-8859-1, use this:
# SourceCharset => 'iso-8859-1',
# die if backend can't work, e. g. can't connect to server
Die => 0,
# Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
Params => {
port => 389,
timeout => 120,
async => 0,
version => 3,
},
},
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
#CustomerUserListFields => ['cn', 'mail'],
CustomerUserListFields => ['sAMAccountName','cn','mail'],
#CustomerUserSearchFields => ['uid', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName','cn','mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 500,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenName', 'sn'],
# show now own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
# add a ldap filter for valid users (expert setting)
# CustomerUserValidFilter => '(!(description=gesperrt))',
# admin can't change customer preferences
AdminSetPreferences => 0,
# cache time to live in sec. - cache any ldap queries
CacheTTL => 60*60,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'givenName', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'sn', 1, 0, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'uid', 1, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'CustomerID', 'mail', 1, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'telephoneNumber', 0, 0, 'var', '', 0 ],
[ 'UserAddress', 'Address', 'postalAddress', 0, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'description', 0, 0, 'var', '', 0 ],
],
};
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# data inserted by installer #
# ---------------------------------------------------- #
# $DIBI$
A weboldalon pedig a következőket állítottam be:
Customer::AuthModule -> LDAP
Customer::AuthModule::LDAP::Host -> dc.example.hu
Customer::AuthModule::LDAP::BaseDN -> cn=otrs, ou=Users, dc=example, dc=hu
Customer::AuthModule::LDAP::UID -> sAMAccountName
Customer::AuthModule::LDAP::SearchUserDN -> cn=otrs, ou=Users, dc=example, dc=hu
Customer::AuthModule::LDAP::SearchUserPw -> password
Customer::AuthModule::LDAP::Params ->
kulcs tartalom
async 0
port 389
timeout 120
version 3
Mit rontok el?
A vicc az egészben, hogy 2-3 hónapja 1x már működött az AD integráció amikor teszteltem az OTRS-t.
A logokban ennyit találtam:
/var/log/apache2/error.log:
ERROR: OTRS-CGI-75 Perl: 5.20.2 OS: linux Time: Tue Oct 13 11:08:31 2015
Message: First bind failed! 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1
RemoteAddress: 10.36.10.105
RequestURI: /otrs/index.pl
Traceback (3524):
Module: Kernel::System::CustomerUser::LDAP::_Connect Line: 198
Module: Kernel::System::CustomerUser::LDAP::CustomerSearch Line: 371
Module: Kernel::System::CustomerUser::CustomerSearch Line: 177
Module: Kernel::Modules::AdminCustomerUser::_Overview Line: 684
Module: Kernel::Modules::AdminCustomerUser::Run Line: 193
Module: Kernel::System::Web::InterfaceAgent::Run Line: 996
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 41
Module: (eval) (v1.99) Line: 207
Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
Module: ModPerl::Registry::handler (v1.99) Line: 32
Van valakinek ötlete, hogy miért nem listázza az AD usereket az OTRS a weboldalon,
ill. hogy miért nem tudok bejelentkezni AD-s felhasználóval a felhasználók felületére?
Előre is köszönöm a segítséget!