Tuesday, December 1, 2009

Test ldap connection against Active Directory

How to test a connection to AD using linux ldapsearch


ldapsearch -LLL -x -H 'ldap://server.com:389' -b 'DC=domain,DC=office,DC=com' -D 'CN=openfire,OU=Service Accounts,OU=User Accounts,OU=DOMAIN,DC=domain,DC=office,DC=com' -W '(sAMAccountName=tor)'


This will make sure that your user can bind, and the in the search they can see user accounts.

We used this for ldap integration for authentication for JIRA and openfire.