First, you will need the LDP.exe utility. LDP is a Lightweight Directory Access Protocol (LDAP) client that allows users to perform operations (such as connect, bind, search, modify, add, delete) against any LDAP-compatible directory, such as Active Directory, ADLDS or ADAM.
LDP can be found for different platforms in the following locations:
- Windows XP Service Pack 2 Support Tools
- For Windows 2000, the support tools are located on the Windows 2000 CD in the Support\Tools folder
- Windows Server 2003 Service Pack 2 32-bit Support Tools
- LDP.exe is installed by default in Windows Server 2008 and Windows Server 2008 R2 installations
To test LDAP over SSL connections, do the following:
- Run the LDP utility (typically, click Start > Run > LDP)
- In the LDP menu, click Connection > Connect
- Enter the directory server name or IP address, the port (typically, 636 for secure LDAP), and check the SSL checkbox, as shown below, then click OK:
- If the connection is successful, you will see a list of output similar to this:
Note that the connection string in the title of the LDP window indicates that the connection is made using ssl
- If you get an error saying, "Cannot open connection," LDP cannot establish a secure connection to the directory server. In this case, it's very likely that the server is not configured properly for LDAP over SSL. Verify the server name/IP address and port number. You can also use the Portqry tool to verify that the directory server is listening on the correct port. Use "portqry /n servername /e 636" to check that servername is listening on endpoint (port) 636.
- The following LDP output indicates that the connection failed because the certificate used in the SSL connection cannot be trusted:
ld = ldap_sslinit("dc01", 636, 1);
Error <0x0> = ldap_set_option(hLdap,LDAP_OPT_PROTOCOL_VERSION, LDAP_VERSION3);
Error <0x51> = ldap_connect(hLdap, NULL);
Server error: {empty}
Error <0x51>: Fail to connect to dc01.
I found a cool utility on Novell's website that can be used to view the SSL certificate on a remote directory server. Download the View Directory Certificate utility and extract the files to a temporary folder. Then run ViewDirCert.exe:
Specify the directory server or IP address and click View Certificate. The certificate details will be displayed in a new window. If the certificate was generated by an untrusted Certificate Authority (CA) or is a self-signed cert that the host does not trust, you will see a warning as shown below:You can configure the host to trust this certificate by either adding the CA to the local machine's Trusted Root Certifications Authorities store or by importing the self-signed certificate into the local machine's Trusted Root Certifications Authorities store.
thanks brother , you helped me a lot
ReplyDeletethank for those information
ReplyDeleteThe error message I get is:
00002029: LdapErr: DSID-0C09016D, comment: Cannot start kerberos
signing/sealing when using TLS/SSL, data 0, vece at ./LDAP-AD-query.pl
Thanks was very helpful !
ReplyDeleteThank you, this helped in troubleshooting a new SSL cert for ldap! Excellent tools you found.
ReplyDelete