Enable AD authentication backend - Search failed! 000004DC

Moderator: crythias

Post Reply
JohnBurg
Znuny newbie
Posts: 6
Joined: 06 Mar 2017, 15:30
Znuny Version: OTRS 5S

Enable AD authentication backend - Search failed! 000004DC

Post by JohnBurg »

Hello everyone,

I'm trying to get OTRS connected to our internal Active Directory server so that Agents and Customers can login with their Active Directory user.
Looking at the documentation http://doc.otrs.com/doc/manual/admin/st ... er-backend this should be possible.

In the Config.pm I added the requested config and restarted the server. When inside the OTRS agent portal and after going to Admin -> Customer User I get the error in syslog "417]: Search failed! 000004DC: LdapErr: DSID-0C090748, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580".

I'm clearly doing something wrong, but can't find out what. Can someone please help me out?

Part of my Config.pm:

Code: Select all

# CustomerUser
# (customer user ldap backend and settings)
    $Self->{CustomerUser} = {
        Name => 'LDAP Backend',
        Module => 'Kernel::System::CustomerUser::LDAP',
        Params => {
            # ldap host
            Host => '192.168.20.1',
            # ldap base dn
            BaseDN => 'OU=CTUsers,DC=ddx,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=Administrator,OU=System Users,OU=ICT,OU=Internal,OU=CTUsers,DC=ddx,DC=local',
            UserPW => 'MySecretPassword1!',
            # 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 => 'sAMAccontname',
        # customer #
        CustomerID => 'mail',
        CustomerUserListFields => ['cn', 'mail'],
        CustomerUserSearchFields => ['sAMAccontname', 'cn', 'mail'],
        CustomerUserSearchPrefix => '',
        CustomerUserSearchSuffix => '*',
        CustomerUserSearchListLimit => 250,
        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 => 0,
        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, 1, 'var', '', 0 ],
            [ 'UserLogin',      'Username',   'sAMAccontname',   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 ],
            [ 'UserPhone',      'Phone',      'telephonenumber', 1, 0, 'var', '', 0 ],
            [ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
            [ 'UserComment',    'Comment',    'description',     1, 0, 'var', '', 0 ],
            # this is needed, if "SMIME::FetchFromCustomer" is active
            # [ 'UserSMIMECertificate', 'SMIMECertificate', 'userSMIMECertificate',      0, 1, 'var', '', 0 ],
        ],
    };
wurzel
Znuny guru
Posts: 3225
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Enable AD authentication backend - Search failed! 000004DC

Post by wurzel »

Hi,
successful bind must be completed
usually is wrong username/password (or protocol/port)

regards,
Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
JohnBurg
Znuny newbie
Posts: 6
Joined: 06 Mar 2017, 15:30
Znuny Version: OTRS 5S

Re: Enable AD authentication backend - Search failed! 000004DC

Post by JohnBurg »

Hi Florian,

Thank you for your reply.

I also thought it was the username and or password, but I tried 3 different users where I know that the password is correct.
Did I define the user and password correctly or am I missing more config that needs to be added?
JohnBurg
Znuny newbie
Posts: 6
Joined: 06 Mar 2017, 15:30
Znuny Version: OTRS 5S

Re: Enable AD authentication backend - Search failed! 000004DC

Post by JohnBurg »

I found the problem ...... just look at the sAMAccontname in the config which should be sAMAccountname.
It's working now. Embarrassing! :lol:

Thanks for the help!
Post Reply