Skip to main content

LDAP Testing

02.05.2018
Mark Bonnot

This is a quick note about how to test LDAP connectivity. Please note that you would replace anything within << >> with your parameters.

This will connect to the LDAP server and return a list of users .

ldapsearch -x -LLL -h <<IPADDRESS YOU WANT TO CONNWECT TO>> -D <<USERNAME>> -w <<PASSWORD>> -b"OU=<<Organizational Unit>>,DC=<<DOMAIN>>,DC=<<TLD>>" -s sub "(objectClass=user)" givenName

A different way to connect where instead of a simple user name, the user is a fullly qualified name ( notice after -D)

ldapsearch -h <<IPADDRESS>> -b "dc=<<DOMAIN>>,dc=<<net,com,org>>" -s sub "(objectClass=user)" givenName -D "CN=<<COMMON NAME>>,OU=<<ORGANIZATIONAL UNIT>>,OU=<<ORGANIZATIONAL UNIT>>,OU=<<ORGANIZATIONAL UNIT>>,DC=<<DOMAIN>>,DC=<<net,com,org,etc>>" -w <<PASSWORD>> -x -LLL
Categories: LDAP Testing