LDAP in OTRS 6

Moderator: crythias

Locked
clopez
Znuny newbie
Posts: 2
Joined: 10 Sep 2018, 11:11
Znuny Version: version 6

LDAP in OTRS 6

Post by clopez »

Hi,
I'm new in OTRS, and after read a lot of posts and guides I finally choosed OTRS as the ticket system in my high school.
I installed OTRS 6, and I want to Integrate the LDAP system for all the teachers (to open tickets), and for some IT teachers that maintain the systems (as me). I read some posts, and guides (as the official: https://doc.otrs.com/doc/manual/admin/6 ... kends.html), but I can't connect to the LDAP server. I can't see neither something in the logs.
I edit my Kernel/Config.pm file, adding the following lines:

Code: Select all

        $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
        $Self->{'Customer::AuthModule::LDAP::Host'} = 'localhost';
        $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=mydc,dc=local';
        $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
        $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=mycn,dc=mydc,dc=local';
        $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'pass';
        $Self->{'Customer::AuthModule::LDAP::Params'} = {
            port => 389,
            timeout => 120,
            async => 0,
            version => 3,
        };
        $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'Docente,ou=Groups,dc=mydc,dc=local';
        $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';
        $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';


        $Self->{CustomerUser} = {
                    Name => 'LDAP IES',
                    Module => 'Kernel::System::CustomerUser::LDAP',
                    Params => {
                                # ldap host
                                Host => 'localhost',
                                # ldap base dn
                                BaseDN => 'dc=mydc,dc=local',
                                # 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=mycn,dc=mydc,dc=local',
                                UserPw => 'pass',
                                # 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 => '',
                                    # 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 => 'uid',
                    # customer #
                    CustomerID => 'mail',
                    CustomerUserListFields => ['cn', 'mail'],
                    CustomerUserSearchFields => ['uid', 'cn', 'mail'],
                    CustomerUserSearchPrefix => '',
                    CustomerUserSearchSuffix => '*',
                    CustomerUserSearchListLimit => 250,
                    CustomerUserPostMasterSearchFields => ['mail'],
                    CustomerUserNameFields => ['givenname', 'sn'],
                    # show not own tickets in customer panel, CompanyTickets
                    CustomerUserExcludePrimaryCustomerID => 0,
                    # add an ldap filter for valid users (expert setting)
                #    CustomerUserValidFilter => '(!(description=locked))',
                    # mycnistrator can't change customer preferences
                    AdminSetPreferences => 0,
                #    # cache time to live in sec. - cache any database queries
                #    CacheTTL => 0,
                    Map => [
                        # note: Login, Email and CustomerID are mandatory!
                        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
                        [ 'UserTitle',      'Title',      'title',           1, 0, 'var', '', 0 ],
                        [ 'UserFirstname',  'Firstname',  'givenname',       1, 1, 'var', '', 0 ],
                        [ 'UserLastname',   'Lastname',   'sn',              1, 1, 'var', '', 0 ],
                        [ 'UserLogin',      'Username',   'uid',             1, 1, 'var', '', 0 ],
                        [ 'UserEmail',      'Email',      'mail',            1, 1, 'var', '', 0 ],
                        [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1, 'var', '', 0 ],
                #        [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
                    ],
                };
Someone can help us?
Regards
root
Administrator
Posts: 4252
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: LDAP in OTRS 6

Post by root »

Hi,

I suggest replacing localhost with FQDN of the domain controller:

Code: Select all

$Self->{'Customer::AuthModule::LDAP::Host'} = 'localhost';
And also the other occurance in the configuration.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
clopez
Znuny newbie
Posts: 2
Joined: 10 Sep 2018, 11:11
Znuny Version: version 6

Re: LDAP in OTRS 6

Post by clopez »

root wrote: 17 Sep 2018, 12:21 Hi,

I suggest replacing localhost with FQDN of the domain controller:

Code: Select all

$Self->{'Customer::AuthModule::LDAP::Host'} = 'localhost';
And also the other occurance in the configuration.

- Roy
Hi @root,
First of all, thanks for your help. I changed the host, now, i've the domain controller, but the result is the same.
I can't see nothing related with LDAP at the logs (bin/otrs.Console.pl Maint::Log::Print), so I think I can't connect to the LDAP server.
Regards
Locked