ldapsearch command Fails for both TLS and Clear Text Connections with start_tls Error

Solution Unverified - Updated -

Issue

  • Failing to connect with start_tls error:

    Encrypted:

    [root@host ~]$ ldapsearch -v -D "cn=admin,dc=example,dc=com" -W 'password' -Z -H ldaps://ldap-server -b "CN=Users,dc=example,dc=com" -s sub (cn=testuser)
    ldap_initialize( ldaps://ldap-server:636/??base )
    ldap_start_tls: Can't contact LDAP server (-1)
            additional info: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed (unable to get local issuer certificate)
    ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
    

    Plain text:

    [root@host ~]$ ldapsearch -v -D "cn=admin,dc=example,dc=com" -W 'password' -Z -H ldap://ldap-server -b "CN=Users,dc=example,dc=com" -s sub (cn=testuser)
    ldap_initialize( ldap://ldap-server:389/??base )
    ldap_start_tls: Connect error (-11)
            additional info: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed (unable to get local issuer certificate)
    ldap_result: Can't contact LDAP server (-1)
    

Environment

  • Red Hat Enterprise Linux (All Versions)
  • Lightweight Directory Access Protocol (LDAP) or Microsoft Active Directory Lightweight Directory Service (AD)
  • ldapsearch command
  • ldap and ldaps interfaces both enabled on server

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content