LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-03-2020, 02:46 AM   #1
ram300188
LQ Newbie
 
Registered: Feb 2020
Posts: 1

Rep: Reputation: Disabled
ldapsearch failing to connect over tls/ssl to a server from a client


Hi ,

I have installed openldap and trying to do a search on the server using below command.

Command:
ldapsearch -v -h ***.*****.com -p 2636 -b dc=ent,dc=***,dc=***,dc=corp –LLL –s sub -U "(samaccountname=*****)" samaccountname ***-AccountingUnit -D '****' -w '*****' -d-8

Error:
ldap_initialize( ldap://vds.wellsfargo.com:2636 )
ber_dump: buf=0x55b320ec6810 ptr=0x55b320ec6810 end=0x55b320ec6850 len=64
0000: 30 3e 02 01 01 63 39 04 00 0a 01 00 0a 01 00 02 0>...c9.........
0010: 01 00 02 01 00 01 01 00 87 0b 6f 62 6a 65 63 74 ..........object
0020: 63 6c 61 73 73 30 19 04 17 73 75 70 70 6f 72 74 class0...support
0030: 65 64 53 41 53 4c 4d 65 63 68 61 6e 69 73 6d 73 edSASLMechanisms
ber_dump: buf=0x55b320ec6810 ptr=0x55b320ec6815 end=0x55b320ec6850 len=59
0000: 63 39 04 00 0a 01 00 0a 01 00 02 01 00 02 01 00 c9..............
0010: 01 01 00 87 0b 6f 62 6a 65 63 74 63 6c 61 73 73 .....objectclass
0020: 30 19 04 17 73 75 70 70 6f 72 74 65 64 53 41 53 0...supportedSAS
0030: 4c 4d 65 63 68 61 6e 69 73 6d 73 LMechanisms
0000: 30 3e 02 01 01 63 39 04 00 0a 01 00 0a 01 00 02 0>...c9.........
0010: 01 00 02 01 00 01 01 00 87 0b 6f 62 6a 65 63 74 ..........object
0020: 63 6c 61 73 73 30 19 04 17 73 75 70 70 6f 72 74 class0...support
0030: 65 64 53 41 53 4c 4d 65 63 68 61 6e 69 73 6d 73 edSASLMechanisms
ber_get_next failed.
ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)

Please help to resolve this.

I have extracted the certificate using below command
/usr/bin/openssl s_client -showcerts -connect ***.*****.com:2636

and placed it in
/etc/openldap/certs path
 
Old 02-03-2020, 06:58 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ram300188 View Post
Hi ,
I have installed openldap and trying to do a search on the server using below command.
Code:
ldapsearch -v -h ***.*****.com -p 2636 -b dc=ent,dc=***,dc=***,dc=corp –LLL –s sub -U  "(samaccountname=*****)" samaccountname ***-AccountingUnit -D '****' -w '*****' -d-8
Code:
Error:
ldap_initialize( ldap://vds.wellsfargo.com:2636 )
ber_dump: buf=0x55b320ec6810 ptr=0x55b320ec6810 end=0x55b320ec6850 len=64
  0000:  30 3e 02 01 01 63 39 04  00 0a 01 00 0a 01 00 02   0>...c9.........
  0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object
  0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support
  0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms
ber_dump: buf=0x55b320ec6810 ptr=0x55b320ec6815 end=0x55b320ec6850 len=59
  0000:  63 39 04 00 0a 01 00 0a  01 00 02 01 00 02 01 00   c9..............
  0010:  01 01 00 87 0b 6f 62 6a  65 63 74 63 6c 61 73 73   .....objectclass
  0020:  30 19 04 17 73 75 70 70  6f 72 74 65 64 53 41 53   0...supportedSAS
  0030:  4c 4d 65 63 68 61 6e 69  73 6d 73                  LMechanisms
  0000:  30 3e 02 01 01 63 39 04  00 0a 01 00 0a 01 00 02   0>...c9.........
  0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object
  0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support
  0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms
ber_get_next failed.
ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)
Please help to resolve this. I have extracted the certificate using below command
/usr/bin/openssl s_client -showcerts -connect ***.*****.com:2636

and placed it in
/etc/openldap/certs path
Read the "Question Guidelines" link in my posting signature. You don't tell us what version/distro of Linux you're using, or give any details about your environment. Further, we are NOT tech-support for you...we are happy to help, but don't tell us to resolve your problems.

Past that, you are specifying the -U flag...is that correct? Can it work without specifying the user? And why, exactly, are you using the name of a well-known major bank in your query?? Seems rather suspicious.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AIX LDAP client authenticate against Linux Openldap server over TLS/SSL gnu699 AIX 4 01-16-2016 07:04 AM
ldapsearch vs Apache DS LDAP browser (ldapsearch not working properly) eyemole80 Linux - Server 0 02-18-2014 02:45 PM
How to connect to ftp explicit over tls/ssl mathewparet Linux - General 2 11-25-2012 08:31 AM
[SOLVED] Fedora 16 ldapsearch client via ssl won't work dgodbey Fedora 4 06-01-2012 10:17 AM
ldapsearch:: how to use TLS connection? knockout_artist Linux - Newbie 1 09-29-2009 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration