Help with LDAP module for user authentication in Drupal 8.3.7 I just installed Drupal 8.3.7 via composer and am trying to get user logins to work against our LDAP server. I added and enabled the following modules:



We are using ldaps on port 636 rather than START-TLS on port 389 so I configured the LDAP settings as follows:

[SERVER section]
  Name: &lt;whatever&gt;
  Machine-readable name: ldap (not the hostname of our LDAP Server)
  LDAP Server Type: Default LDAP
  Server address: ldaps://&lt;ip address of ldap server&gt;
  Server port: 636

[BINDING section]
  Binding method for searches:L Service Account Bind: Use credentials in the Service Account field below to bind to LDAP
  DN for non-anonymous search: &lt;dn for ldap auth user&gt;
  Password for non-anonymous search: &lt;password for ldap auth user&gt;

[USERS section]
  &lt;base dn for users&gt;
  AuthName attribute: cn


When I try to test this config, I enter my cn in the "Testing Drupal Username" field and then click the Test button. I receive the following errors:

  Failed to bind with service account. LDAP error: Can't contact LDAP server (-1)
  Failed to find test user &lt;my cn&gt; by searching on cn = &lt;my cn&gt;.'


I can perform an ldapsearch using the auth ldap bind DN ok on the Drupal server. I enabled logging but the messages sent to /var/log/localmessages are not useful. I just see things like:

  ldap_search() function error. LDAP Error: Can't contact LDAP server (-1), ldap_search() parameters:
  LDAP search error: Can't contact LDAP server (-1). Context is base DN: &lt;base dn&gt; | filter: (cn=&lt;my cn&gt;)| attributes: []


Anyone have any ideas? I looked at the tcpcdump output comparing ldapsearch and the Drupal LDAP test and I don't see any TLS handshakes in the Drupal test case so I'm not convinced I have the ldaps part of the configuration working correctly.
Found the problem. I had a temporary cert in /tmp and specified in /etc/openldap/ldap.conf but systemd starts httpd with a private /tmp so the cert was not being found.