ldapsearch over ssl (ldaps) to Active Directory

In order for Linux to perform ldapsearch over ssl, you need to import Active Directory CA certificate.

On ActiveDirectory run the following command:
> certutil -ca.cert adca.der

Copy adca.der into the Linux server and convert the cert into Linux friendly cert
#  openssl x509 -inform DER -in adca.der -out adca.crt

Move the file into the default ca-trust directory
# cp adca.crt /etc/pki/ca-trust/source/anchors/
# update-ca-trust

You are ready to run ldapsearch over ssl to Active Directory

Assuming you ad server is adsvr.fosstech.biz for fosstech.biz domain, you can run ldapsearch as follow

# ldapsearch -x -W -H ldaps://adsvr.fosstech.biz  -D "administrator@fosstech.biz" -b "dc=fosstech,dc=biz" *

Cheers!!!

📚 Want to Learn Docker?

I wrote "Levelling Up with Docker: A Practical Guide to Containers" — a hands-on guide for Linux admins who want to learn Docker without the fluff.

What's inside:

  • Rootless Docker installation (Ubuntu, RHEL, SLES)
  • Container networking, volumes, and Docker Compose
  • Private registry setup and troubleshooting playbook

Get it on Amazon: https://www.amazon.com/dp/B0GGZ76PHW

Comments

Popular posts from this blog

SLES 15 LVM + XFS Without Separate /boot Partition

pfSense and scp

SupportConfig Analysis for SLES 12