Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LDAP Query that exclude computers

I had never done any DAP/AD admin or querying. Right now I have a task where I need to get all the USERS in our company's AD; but keep getting computers in the query's result. I use objectClass=user and still get all the computers in the AD. What else am I missing? Is there a way to say "objectClass=user and not objectClass=Computer"? thanks!

like image 585
Luis Garcia Avatar asked Feb 26 '13 14:02

Luis Garcia


1 Answers

Try this filter: (&(objectClass=user)(!(objectClass=computer)))

like image 133
zagyi Avatar answered Sep 20 '22 14:09

zagyi