First bind failed! LDAP

Hilfe zu Znuny Problemen aller Art
Locked
philasd
Znuny newbie
Posts: 8
Joined: 22 Feb 2012, 16:32
Znuny Version: 03007

First bind failed! LDAP

Post by philasd »

Hallo,

ich kaempfe nun schon seit einiger Zeit mit OTRS und der LDAP Authentifizierung.
Ich versuche eigentlich Agents + User via LDAP zu authentifizieren, kriegs aber noch nichtmal mit den Usern hin.

Nach tagelangem googlen erbitte ich nun euch um Hilfe.

./Kernel/Config.pm

Code: Select all

 $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
    $Self->{'Customer::AuthModule::LDAP::Host'} = 'ldap://sonstwas';
    $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'OU=asd,DC=asd,DC=asd,DC=de';
    $Self->{'Customer::AuthModule::LDAP::UID'} = 'uid';

    # The following is valid but would only be necessary if the
    # anonymous user does NOT have permission to read from the LDAP tree
    $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=LDAP_OTRS_BLA,cn=Users,dc=asd,dc=asd,dc=asd';
    $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'BLA_BLA';
Error:

Code: Select all

 Message: First bind failed! 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1

 Traceback (26365):
   Module: Kernel::System::CustomerAuth::LDAP::Auth (v1.37) Line: 193
   Module: Kernel::System::CustomerAuth::Auth (v1.34) Line: 151
   Module: Kernel::System::Web::InterfaceCustomer::Run (v1.56.2.1) Line: 203
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_customer_2epl::handler (unknown version) Line: 46
   Module: (eval) (v1.43.2.1) Line: 204
   Module: ModPerl::RegistryCooker::run (v1.43.2.1) Line: 204
   Module: ModPerl::RegistryCooker::default_handler (v1.43.2.1) Line: 170
   Module: ModPerl::Registry::handler (v1.99) Line: 31
Ldapsearch mit falschem PW

Code: Select all

ldapsearch -h 192.168.1.42 -D "cn=LDAP_OTRS_BLA,cn=Users,dc=asd,dc=asd,dc=asd" -w BLA_BL -L "objectClass=*"
ldap_bind: Invalid credentials (49)
        additional info: 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1
Mit richtigem ...

Code: Select all

ldapsearch -h 192.168.1.42 -D "cn=LDAP_OTRS_BLA,cn=Users,dc=asd,dc=asd,dc=asd" -w BLA_BLA -L "objectClass=*"
version: 1

#
# LDAPv3
# base <> (default) with scope subtree
# filter: objectClass=*
# requesting: ALL
#

# search result
No such object (32)
Additional information: 0000208D: NameErr: DSID-031001E5, problem 2001 (NO_OBJECT), data 0, best match of:
        ''


# numResponses: 1
Schon gelesen
Hat nichts gebracht - mal abgesehen davon, dass ich nur LDAP benutze und nicht LDAPS ...

Komplette Konfigs brauche ich auch nicht, Denkanstößte wären sehr nett. =D
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: First bind failed! LDAP

Post by Wolfgangf »

hast Du diesen Teil auch gemacht?

Code: Select all

 $Self->{'Customer::AuthModule::LDAP::Params'} = {
        port => 389, (
        timeout => 10,
        async => 0,
        version => 3,
    };
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
philasd
Znuny newbie
Posts: 8
Joined: 22 Feb 2012, 16:32
Znuny Version: 03007

Re: First bind failed! LDAP

Post by philasd »

Code: Select all

 $Self->{'Customer::AuthModule::LDAP::Params'} = {
        port => 389, (
        timeout => 120,
        async => 0,
        version => 3,
    };
So hab ichs, wird wohl keinen Unterschied machen ... Ich probiers mal aus ^.^


____
Error bleibt der gleiche ... :-/

Könnte der Fehler auch Zustande kommen, wenn die Logindaten, die in der Customer.pl eingegeben werden vom User falsch sind? Die sind zwar richtig, aber vllt haperts da mit Escapen oder so ... ?
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: First bind failed! LDAP

Post by Wolfgangf »

bei der Fehlermeldung "First Bind failed" würde ich eher auf Probleme mit dem SearchUser tippen
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
vbkomm
Znuny newbie
Posts: 14
Joined: 10 Apr 2012, 11:00
Znuny Version: 3.1.3
Real Name: Ralf von Brocken
Company: vBKomm GmbH

Re: First bind failed! LDAP

Post by vbkomm »

Hallo,

gibt es schon eine Lösung? Ich komme mit der LDAP-Anbindung auch keinen Schritt weiter.

Identische Fehlermeldung im LOG-File.

Zugriff mit LDAP-Browser funktioniert problemlos.

Beste Grüsse

Ralf
Mfg

Ralf von Brocken

vBKomm GmbH
boris
Znuny wizard
Posts: 554
Joined: 22 Feb 2010, 18:27
Znuny Version: 3.0.4

Re: First bind failed! LDAP

Post by boris »

guckt mal hier viewtopic.php?f=17&t=7558.
Hilft das?

First Bind failed sollte aber ein Problem mit den Search User sein
Produktiv:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL

Test:
OTRS 3.1.7
CentOS 6.3
Apache2/MySQL
root
Administrator
Posts: 4237
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: First bind failed! LDAP

Post by root »

Enthaelt Dein Passwort Sonderzeichen? Manchmal spielen einem die unterschiedlichen Kodierungen einen Streich. Probier doch mal ein Passwort das nur aus 7-Bit ASCII Zeichen besteht.
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 ?
philasd
Znuny newbie
Posts: 8
Joined: 22 Feb 2012, 16:32
Znuny Version: 03007

Re: First bind failed! LDAP

Post by philasd »

Jetzt lags ne Zeit. Inzwischen bin ich wieder dran ... ^.^

AAAAlso.
http://trinityhome.org/Home/index.php?w ... ront_id=18
Dem bin ich mal nachgelaufen und hab alles angepasst, von dem ich denke dass es angepasst werden muesste.
Angepasst sind:
LDAP::HOST (spricht mit nem AD-Controller)
LDAP::BaseDN
LDAP::SearchUserDN
LDAP::SearchUserPw

Sowie

Code: Select all

#(customer user database backend and settings)
    $Self->{CustomerUser} = {
      Module => 'Kernel::System::CustomerUser::LDAP',
      Params => {
      Host => 'host.example.com',
      BaseDN => 'OU=BaseOU,DC=example,DC=com',
      SSCOPE => 'sub',
      UserDN =>'otrs_ldap',
      UserPw => 'PASSWORD',
    },
Alles andere habe ich gelassen. Muss ich z.B. CustomerKey aendern? Ich weiß es um ehrlich zu sein nicht. Was ist sAMAccountName? Fehlt da das e fuer same

Code: Select all

#Add the following lines when only users are allowed to login if they reside in the spicified security group
#Remove these lines if you want to provide login to all users specified in the User Base DN
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=BaseOU, dc=example, dc=com'; (auch angepasst)
#  $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'CN=otrs_ldap_allow_C,OU=Groups,OU=BaseOU,DC=example,DC=com';
#  $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'member';
#  $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN'
Den Teil habe ich auskommentiert, weil ich das nicht nutzen moechte.
Der Error bleibt - 52e. ldapsearch laesst mich mit den gleichen Parametern immernoch rein. Liegt es evtl an dem Login-Customer? Also derjenige, der seine Creds tatsaechlich eingibt? Die Stimmen definitiv auch, aber evtl gibts ja da Probleme mit der Kommunikation?!
Der Error wird 2x im Systemprotokoll angezeigt...
Ich probier den Spass jetzt mal mit Agents.
Bootsmann
Znuny newbie
Posts: 3
Joined: 10 Jul 2012, 16:13
Znuny Version: 3.1.0

Re: First bind failed! LDAP

Post by Bootsmann »

Hi,

Code: Select all

$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'ou=BaseOU, dc=example, dc=com'; (auch angepasst)
Nimm aus der Zeile mal die 'OU' raus und beschränke sie nur auf den "FQHN".

Gruß,
d'Bootsmann

PS: Stehe selber bei der LDAP-Abfrage auf dem Schlauch. Kannst ja mal hier viewtopic.php?f=35&t=14787 gucken.
Locked