Enabling SSL Access to AD LDS (Lightweight Directory Services) (2024)

June 26th at 12:00am

We recently had some issues recently implementing SSL on a Active Directory Lightweight Directory Services box.

Here are some of the errors we were seeing:

  • LDP.exe shows Cannot open connection when attempting connection using SSL over port 636

Windows System Event log:

  • Description: A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030d. The internal error state is 10001.
  • Description: No suitable default server credential exists on this system. This will prevent server applications that expect to make use of the system default credentials from accepting SSL connections. An example of such an application is the directory server. Applications that manage their own credentials, such as the internet information server, are not affected by this.

Windows Security Event Log:

  • Severity: FailureAudit
    Date Time: 6/24/2011 6:56:48 PM
    Source: Microsoft-Windows-Security-Auditing
    Category: (12290)
    Event ID: 5061

Notes:

  • AD LDS installed on Windows Server 2008 R2 Standard (Virtual Machine)
  • The VM was an instance of a template which already had LDS installed
  • This server was not joined to any domain
  • In the end this appears to have been a permissions issue (read on for details)
  • The Complete text to the error messages I encountered during this process are posted below for better searchability

I tried various steps to get SSL Authentication working with this server. In the end, these are the steps that I found to work:

Note: Microsoft Article Configuring LDAP over SSL Requirements for AD LDS is a must-read for anyone wanting to set this up

1) Created & Installed a Server Certificate Per the MS Guidelines which are:

  • Certificate must be issued to the FQDN of the Server running LDS
  • Installed the certificate to the Local Machine "Personal" certificate store

For help on using MakeCert to create a general purpose certificate, here is a helpful blog post

2) Navigated to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys and ensured that the Network service and Local System accounts had access to the files in this folder

Note 1: This is not best practice in a production environment. I would suggest only adding read / read & execute permissions for the Service Account that Lightweight Directory Services is using

Note 2: To get SSL authentication to work, I actually had to clear all the permissions from the MachineKeys folder and re-assign the permissions manually. YMMV.

3) To ensure access to the LDS server from other machines in our environment I had to install the certificate on the other machines. I also had to add a hosts file / DNS entry for the Directory server. It appears that the secure connection will only work when the FQDN of the Directory Server is used.

Result: After completing these steps, I was able to connect to the Directory Server using SSL.

Comprehensive Troubleshooting Steps:

  • When I saw that SSL Connectivity was not working, I looked for MS Documentation
  • After Installing the certificates and setting up permissions on the files in the MachineKeys folder per the MS ArticleI was still having authentication issues
  • As this was a cloned Virtual Machine, I tried making a certificate for the original name of the machine and installing it to the same store as the Certificate for the current FQDN (LocalMachine\Personal)
  • When that did not work, I began looking in the Windows Event logs and found what appeared to be security / permissions issues
  • I did some google searching and found some suggestions to export then re-import the certificate (This did not work for me)
  • In an attempt to gain more information I searched the registry for information on the GUIDs listed in the messages (No results returned)
  • When none of this worked, I cleared the permissions on the C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys folder (along with the folder contents) and re-applied what I considered to be a broad enough permissions set to the files to allow SSL authentication to work. I applied Full Controlto Network Service, Local System and Administrators.
    • While this is a bit broad (unsuitable for Production), it works for us as an interim solution While we get a more suitable machine setup.

Complete text of errors encountered during the setup process:

Windows System Event Log:

Severity: Error
Date Time: 6/24/2011 6:35:14 PM
Source: Schannel
Category: (0)
Event ID: 36870
User: NT AUTHORITY\SYSTEM
Computer:TEST-MACHINEDescription: A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030d. The internal error state is 10001.

Severity: Warning
Date Time: 6/24/2011 6:59:06 PM
Source: Schannel
Category: (0)
Event ID: 36886
User: NT AUTHORITY\SYSTEM
Computer:TEST-MACHINEDescription: No suitable default server credential exists on this system. This will prevent server applications that expect to make use of the system default credentials from accepting SSL connections. An example of such an application is the directory server. Applications that manage their own credentials, such as the internet information server, are not affected by this.

Windows Security Event Log:

Severity: FailureAudit
Date Time: 6/24/2011 6:42:37 PM
Source: Microsoft-Windows-Security-Auditing
Category: (12290)
Event ID: 5061
User:
Computer:TEST-MACHINE

Description: Cryptographic operation.

Subject:
Security ID: S-1-5-20
Account Name: JW-LDAPANDSMTP$
Account Domain: WORKGROUP
Logon ID: 0x3e4

Cryptographic Parameters:
Provider Name: Microsoft Software Key Storage Provider
Algorithm Name: %%2432
Key Name: {B1E98987-90F2-44E4-A872-8D544312270F}
Key Type: %%2499

Cryptographic Operation:
Operation: %%2480
Return Code: 0x80090010

Severity: FailureAudit
Date Time: 6/24/2011 6:56:48 PM
Source: Microsoft-Windows-Security-Auditing
Category: (12290)
Event ID: 5061
User:
Computer:TEST-MACHINE

Description: Cryptographic operation.

Subject:
Security ID: S-1-5-20
Account Name:TEST-MACHINE$
Account Domain: WORKGROUP
Logon ID: 0x3e4

Cryptographic Parameters:
Provider Name: Microsoft Software Key Storage Provider
Algorithm Name: %%2432
Key Name: PvkTmp:a8c7b6cc-132d-499a-9358-7ea733785aab
Key Type: %%2499

Cryptographic Operation:
Operation: %%2480
Return Code: 0x80090010

Severity: FailureAudit
Date Time: 6/24/2011 6:59:32 PM
Source: Microsoft-Windows-Security-Auditing
Category: (12290)
Event ID: 5061
User:
Computer:TEST-MACHINE

Description: Cryptographic operation.

Subject:
Security ID: S-1-5-20
Account Name: JW-LDAPANDSMTP$\
Account Domain: WORKGROUP
Logon ID: 0x3e4

Cryptographic Parameters:
Provider Name: Microsoft Software Key Storage Provider
Algorithm Name: %%2432
Key Name: {28FBF6F8-B4D4-4181-AFC3-8559C1877AE6}
Key Type: %%2499

Cryptographic Operation:
Operation: %%2480
Return Code: 0x80090010

Enabling SSL Access to AD LDS (Lightweight Directory Services) (2024)

FAQs

How to enable SSL in Active Directory? ›

Select Start | All Programs | Windows Support Tools | Command Prompt. Start the ldp tool by typing ldp at the command prompt. From the ldp window, select Connection | Connect and supply the host name and port number (636). Also select the SSL check box.

How do I enable Active Directory Lightweight Directory services? ›

in order to install LDS, User need to log in with local administrator privileges. Once log in to the Server Manager, click on Add Roles and Features. Then follow the wizard and select Active Directory Lightweight Directory Services under server roles and proceed with the enabling the role.

How to enable LDAPS on Active Directory? ›

Verify an LDAPS connection
  1. Start the Active Directory Administration Tool (Ldp.exe).
  2. On the Connection menu, click Connect.
  3. Type the name of the domain controller to which you want to connect.
  4. Type 636 as the port number.
  5. Click OK. RootDSE information should print in the right pane, indicating a successful connection.
Feb 19, 2024

How to enable SSL on LDAP? ›

To use SSL for secure LDAP communication, preconfigure the following on the LDAP server.
  1. Enable SSL.
  2. Set a secure port (the port is 636 by default).
  3. Install a server certificate.
  4. Obtain a root certificate (and any intermediate) of the Certificate Authority (CA) that issued the LDAP server certificate.

How do I enable SSL? ›

Enabling SSL on a Windows Server involves a few steps.
  1. Install SSL Certificate: Install SSL certificate from a Certificate Authority (CA). ...
  2. Configure IIS: Open Internet Information Services (IIS) Manager. ...
  3. Verify Firewall Settings: ...
  4. Update Website Links: ...
  5. Restart IIS:
Aug 18, 2023

How would you activate SSL on your system? ›

Under Install and Manage SSL for your site (HTTPS), click Manage SSL Sites. Scroll down to the Install an SSL Website and click Browse Certificates. Select the certificate that you want to activate and click Use Certificate.

What is the difference between AD and AD LDS? ›

Although AD LDS and Active Directory can operate concurrently within the same network, AD LDS serves the requirements of specific applications. An instance of AD LDS can be created for a specific application without concern for the dependencies required by Active Directory.

How to connect to ad lds? ›

Right-click your instance of AD LDS and select ldp.exe from the pop-up. At the top of ldp.exe, select Connection and Connect.

What is the Active Directory Lightweight Directory Access Protocol? ›

LDAP uses a relatively simple, string-based query to extract information from Active Directory. LDAP can store and extract objects such as usernames and passwords in Active Directory and share that object data throughout a network.

How do I enable LDAPS on my client? ›

Setting up Windows LAPS
  1. Log On to Entra ID.
  2. Navigate to Devices.
  3. Inside devices open Device Settings.
  4. Turn on the Enable Azure AD Local Administrator Password Solution (LAPS)
  5. Click Save to save the changes.
Oct 12, 2023

How to verify LDAPS is enabled? ›

Verify LDAPS
  1. In PowerShell, start LDP.exe and navigate to Connection > Connect.
  2. In the Connect dialog, complete the following steps: In the Server field, enter your domain name. In the Port field, enter 636 . Select the SSL checkbox. Click OK. If LDAPS is properly enabled, the connection succeeds.

What is the difference between LDAP and LDAPS Active Directory? ›

Encryption: The most significant difference between LDAP and LDAPS is encryption. LDAPS encrypts the connection from the start, ensuring that all data (including credentials) exchanged between the client and server is encrypted. In contrast, LDAP transmits data in plain text, making it vulnerable to eavesdropping.

How to check LDAP SSL certificate? ›

  1. Run the following command from your local computer: openssl s_client -showcerts -connect <ip or fqdn of your active directory server>:636.
  2. In the output, copy the certificate portion of the output to a text file.
Apr 9, 2024

How to use LDAPS instead of LDAP? ›

Switching from LDAP to LDAPS involves a close look at your directory service events log, manually identifying and switching the ports that legacy apps are using to bind to the directory, extracting CA (Certificate Authority) certificates to create the secure bind, and continued monitoring.

What is the default SSL port for LDAP? ›

The default port for LDAPS is 636. If you have LDAPS deployed on your network, you can install it with the default port or use an alternative port for queries. The default port allocated for LDAPS is the encrypted port 636, but administrators can use the alternative unencrypted port 389 for cleartext queries.

How do I enable TLS in Active Directory? ›

Solution
  1. Open the Control Panel on a domain controller.
  2. Open the Add or Remove Programs applet.
  3. Click on Add/Remove Windows Components.
  4. Check the box beside Certificate Services and click Yes to verify.
  5. Click Next.

How do I set SSL parameter to enabled? ›

Use case
  1. At the command line, type: set ssl parameter -defaultProfile ENABLED.
  2. If you prefer to use the GUI, navigate to Traffic Management > SSL > Change advanced SSL settings, scroll down, and select Enable Default Profile.
Dec 29, 2023

How do I enable auto SSL? ›

Reconfiguring AutoSSL
  1. Log in to cPanel. If you do not know how to log in to your cPanel account, please see this article.
  2. Open the SSL/TLS Status tool: If you are using the Jupiter theme, on the Tools page, in the Security section, click SSL/TLS Status: ...
  3. Click Include Domains during AutoSSL. This re-enables AutoSSL.

How do I enable SSL ports? ›

Enabling SSL Port on Windows Firewall
  1. Start > Settings > Control Panel.
  2. Click the Windows Firewall icon. A window appears.
  3. Click the Exceptions tab.
  4. Click the Add Port button. A window appears.
  5. Enter the name in Name field.
  6. Enter the Administration Server's port number in Port field.
  7. Select the TCP option.
  8. Click the OK button.

Top Articles
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6163

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.