[Samba] net ads search.

John Stile john at stilen.com
Thu Jul 30 11:19:08 MDT 2009


I am trying to find a way from the command line to search for a users
exchange email address based on the user name.

This exposed my lack of understanding for 'net ads search'

The man page for 'net' in the search section says "Perform a raw LDAP
search on a ADS server and dump the results. The expression is a
standard LDAP search expression, and the attributes are a list of LDAP
fields to show in the results."

So I tried 
  net --user=myuser ads search '(objectClass=user)(email=*)'
which errors:
  search failed: Bad search filter

Can someone offer some advice on:
 a) why is that a bad ldap search filter?
 b) what search would get the exchange email address for a given users?



More information about the samba mailing list