External LDAP authentication fails with error '([Net::LDAP::Error]: hostname "ad.example.com" does not match the server certificate)'.

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • External LDAP authentication fails with error '([Net::LDAP::Error]: hostname "ad.example.com" does not match the server certificate)':

    Oops, we're sorry but something went wrong ERF77-7089 [Foreman::LdapException]: Error while connecting to 'LDAP source' LDAP server at 'ad.example.com' during authentication ([Net::LDAP::Error]: hostname "ad.example.com" does not match the server certificate)
    

Resolution

Diagnostic Steps

  1. Test connection to the LDAP from satellite :

    Satellite webUI -> Administer -> LDAP Authentication -> [Authentication Source Name] -> LDAP server -> Test Connection
    ERF50-1006 [Foreman::WrappedException]: Unable to connect to LDAP server ([Net::LDAP::Error]: hostname "ldap.satellite.com" does not match the server certificate)
    
  2. Get the CN name on the LDAP SSL certificate from the LDAP server :

     # openssl s_client -connect <FQDN_AD>:636  -showcerts -state | grep CN
    
  3. Check the LDAP server on the satellite LDAP Authentication.

    # hammer auth-source ldap info --name " Authentication Source Name" | grep Server:
    
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.