No Customer record is found in the customer LDAP backend

Moderator: crythias

Locked
otrsfan3000
Znuny newbie
Posts: 6
Joined: 09 Nov 2011, 21:03
Znuny Version: 3.0.11
Real Name: Andres Ramirez
Company: New York Medical College

No Customer record is found in the customer LDAP backend

Post by otrsfan3000 »

Hello, I hope someone can help shed some light as to what I'm doing wrong here. I've gone through lots of different threads and their solutions but nothing seems to work for me. This is my setup: I want to have agents authenticate via the default DB (and that works ok) and have users/customers authenticate via LDAP (and that's not working well). I also want to be able to look-up customers via the customers menu (but that is not working either). Below are the contents of my config.pm:

Code: Select all

# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2010 xxx, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.23 2010/01/13 22:25:00 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --

package Kernel::Config;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #


    $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
    $Self->{'Customer::AuthModule::LDAP::Host'} = 'domain';
    $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=domain,dc=edu';
    $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
    $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'sAMAccountName';
    $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=LastName FirstName,cn=Users,dc=domain,dc=edu';
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'mypassword';
    $Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '(objectclass=user)';
    
    $Self->{CustomerUser} = {
       Name => 'LDAP Data Source',
       Module => 'Kernel::System::CustomerUser::LDAP',
       Params => {
          Host => 'domain',
          BaseDN => 'dc=domain,dc=edu',
          SSCOPE => 'sub',
          UserDN => 'cn=LastName FirstName,cn=Users,dc=domain,dc=edu',
          UserPW => 'mypassword',
          AlwaysFilter => '',
          Params => {
                port => 389,
                timeout => 120,
                async => 0,
                version => 3,
          },
       }, 
    
       CustomerKey => 'sAMAccountName',
       CustomerID => 'mail',
       CustomerUserListFields => ['cn', 'mail'],
       CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
       CustomerUserSearchListLimit => 250,
       CustomerUserPostMasterSearchFields => ['mail'],
       CustomerUserNameFields => ['givenname', 'sn'],
       CustomerUserExcludePrimaryCustomerID => 0,
       AdminSetPreferences => 0,
       Map => [
          #[ 'UserSalutation', 'Title',      'title',           1, 0, 'var', '', 0 ],
           [ 'UserFirstname',  'Firstname',  'givenname',       1, 1, 'var', '', 0 ],
           [ 'UserLastname',   'Lastname',   'sn',              1, 1, 'var', '', 0 ],
           [ 'UserLogin',      'Username',   'sAMAccountName',  1, 1, 'var', '', 0 ],
           [ 'UserEmail',      'Email',      'mail',            1, 1, 'var', '', 0 ],
           [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1, 'var', '', 0 ],
          #[ 'UserPhone',      'Phone',      'telephonenumber', 1, 0, 'var', '', 0 ],
          #[ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
           [ 'UserComment',    'Comment',    'description',     1, 0, 'var', '', 0 ],
       ],
    };

    $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
    $Self->{'AuthSyncModule::LDAP::Host'} = 'domain';
    $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domain,dc=edu';
    $Self->{'AuthSyncModule::LDAP::UID'} = 'sAMAccountName';
    # The following is valid but would only be necessary if the
    # anonymous user do NOT have permission to read from the LDAP tree
    $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'cn=LastName FirstName,cn=Users,dc=domain,dc=edu';
    $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = 'mypassword';    



    
# ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'hot';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";


    

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = 'C:/PROGRA~2/OTRS/OTRS';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{CheckMXRecord} = 0;

    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #

    $Self->{LogModule}          = 'Kernel::System::Log::File';
    $Self->{LogModule::LogFile} = 'C:/PROGRA~2/OTRS/OTRS/var/log/otrs.log';
    # $DIBI$
    $Self->{'DefaultCharset'} = 'utf-8';

    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use warnings;

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.23 $)[1];

use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

# -----------------------------------------------------#

1;
When I try to log as a customer I receive the following error:

Code: Select all

[Wed Nov  9 14:06:03 2011][Notice][Kernel::System::CustomerAuth::LDAP::Auth] CustomerUser: myusername (CN=LastName FirstName,CN=Users,DC=domain,DC=edu) authentication ok (REMOTE_ADDR: 10.7.xx.xx).
[Wed Nov  9 14:06:03 2011][Error][Kernel::System::CustomerUser::LDAP::CustomerUserDataGet][614] 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece 
[Wed Nov  9 14:06:03 2011][Error][Kernel::System::CustomerUser::SetPreferences][493] No such user 'myusername'!
[Wed Nov  9 14:06:03 2011][Error][Kernel::System::CustomerUser::LDAP::CustomerUserDataGet][614] 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece 
[Wed Nov  9 14:06:03 2011][Error][Kernel::System::CustomerUser::LDAP::CustomerUserDataGet][614] 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece 
And when I try to search for a customer, the following error comes up:

Code: Select all

[Wed Nov  9 14:28:14 2011][Error][Kernel::System::CustomerUser::LDAP::CustomerSearch][363] 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece 
Below is an example of an LDAP user entry

Code: Select all

accountExpires: unspecified
badPasswordTime: 11/8/2011 9:51:40 PM
badPwdCount: 0
cn: LastName FirstName
codePage: 0
countryCode: 0
description: EMPLOYEE
displayName: LastName, FirstName
distinguishedName: CN=lastName FirstName,CN=Users,DC=domain,DC=edu
dSCorePropagationData: 7/14/1601 10:36:49 PM
dSCorePropagationData: 6/22/2011 6:33:33 PM
dSCorePropagationData: 5/17/2011 6:33:05 PM
dSCorePropagationData: 5/17/2011 6:43:50 PM
dSCorePropagationData: 5/23/2011 7:33:19 PM
givenName: FirstName
homeDirectory: \\SharedDrive\Somewhere
homeDrive: X:
homeMDB: xxxxxx
homeMTA: xxxxxx
instanceType: [ Writable ]
lastLogoff: unspecified
lastLogon: 11/8/2011 9:51:49 PM
lastLogonTimestamp: 11/6/2011 11:06:12 PM
legacyExchangeDN: xxxxx
lockoutTime: unspecified
logonCount: 628
mail: myemailadress
mailNickname: My nickname
mDBUseDefaults: TRUE
memberOf: GroupA
memberOf: GroupB
memberOf: GroupC
memberOf: GroupD
memberOf: GroupE
memberOf: GroupF
memberOf: GroupG
memberOf: GroupH
memberOf: GroupI
memberOf: GroupJ
msExchALObjectVersion: 60
msExchHideFromAddressLists: FALSE
msExchHomeServerName: servername
msExchMobileMailboxFlags: 1
msExchPoliciesIncluded: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX},{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
msExchRecipientDisplayType: 1073741824
msExchRecipientTypeDetails: 1
msExchUserAccountControl: 0
msExchUserCulture: en-US
msExchVersion: 4535486012416
msNPAllowDialin: TRUE
name: LastName FirstName
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=domain,DC=edu
objectClass: person
objectClass: organizationalPerson
objectClass: user
objectClass: top
primaryGroupID: 513
proxyAddresses: SMTP:myemailaddress
proxyAddresses: stuff;
pwdLastSet: 10/11/2011 5:29:47 PM
sAMAccountName: myusername
sAMAccountType: < samUserAccount >
scriptPath: pathgoeshere
showInAddressBook: addressbook path
showInAddressBook: addressbook path
sn: LastName
textEncodedORAddress: c=US;a= ;p=MAIL;o=DOMAIN.EDU;s=LastName;g=FirstName;
userAccountControl: [ NormalAccount ]
userParameters: somestuff
userPrincipalName: myemailaddress
uSNChanged: XXXXXXXXX
uSNCreated: XXXXXXXXX
whenChanged: 11/6/2011 11:06:13 PM
whenCreated: 1/21/2011 7:47:02 PM
logonHours: FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF  FF
msExchMailboxGuid: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
msExchMailboxSecurityDescriptor: X:XXX:XXX:(X;XX;XXXX;;;XX)
Also, if its pertinent, I have OTRS running on a windows7 64bit machine and installed it using the full exe installer.
Any tips on what I've doing wrong would be greatly appreciated.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: No Customer record is found in the customer LDAP backend

Post by jojo »

You Bind User credentials are wrong
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
otrsfan3000
Znuny newbie
Posts: 6
Joined: 09 Nov 2011, 21:03
Znuny Version: 3.0.11
Real Name: Andres Ramirez
Company: New York Medical College

Re: No Customer record is found in the customer LDAP backend

Post by otrsfan3000 »

Thanks for the quick reply. But I'm confused, if the issue is a bad password how come at first it does authenticate the customer?

Code: Select all

[Wed Nov  9 14:06:03 2011][Notice][Kernel::System::CustomerAuth::LDAP::Auth] CustomerUser: myusername (CN=LastName FirstName,CN=Users,DC=domain,DC=edu) authentication ok (REMOTE_ADDR: 10.7.xx.xx).
Also, from another thread, I noticed a mention of 'critical characters'. Could my issue lie in the fact that my password contains special characters like ~@#$%?

Lastly, when you say my Bind User credentials are wrong, where should I fix them? would that be here:

Code: Select all

$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=LastName FirstName,cn=Users,dc=domain,dc=edu';
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'mypassword';
and here?

Code: Select all

UserDN => 'cn=LastName FirstName,cn=Users,dc=domain,dc=edu',
          UserPW => 'mypassword',
Thanks again.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: No Customer record is found in the customer LDAP backend

Post by jojo »

yes, tehese two places are correct.

The first Auth is done with the data from the user login in, the next step will be done with the Bind user (reading data from LDAP)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
otrsfan3000
Znuny newbie
Posts: 6
Joined: 09 Nov 2011, 21:03
Znuny Version: 3.0.11
Real Name: Andres Ramirez
Company: New York Medical College

Re: No Customer record is found in the customer LDAP backend

Post by otrsfan3000 »

Very cool. Everything is working now. Thanks for all your help jojo.
Locked