I am trying run an LDAP query from a Linux machine (CentOS 5.8) to a Windows LDAP server and want to get 'memberof' detail for a user. In this example, the Domain is cm.loc and the user is email@example.com. Here is the ldapsearch syntax I am using. It returns an error.
Can someone point me in the right direction with what the correct syntax should be using ldapsearch to query for memberof detail for a particular account?
Here is what I am using that returns error; "ldap search ext bad search filter 7"
ldapsearch –x –h 192.168.1.20 –b 'DC=cm,DC=loc' -s base –D 'firstname.lastname@example.org' -W '(&(objectCategory=Group)(|(memberOf=group1)(memberOf=group2)…))'