Re: Bad filter in Active Directory: (!company=mycompany)

Graham Barr <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
On Oct 23, 2008, at 9:49 AM, A. Farber wrote:
>
> If I remove "!" it works ok. If I try that filter with dsquery:
>
> dsquery * domainroot -filter "(&(objectCategory=Person)
> (objectClass=User)(!company=mycompany))
>
> - then it works too. Has anybody seen the same problem?

dsquery is being lenient here. For the filter to be cirrect the test  
you are trying to ! must also be inside ()'s

   "(&(objectCategory=Person)(objectClass=User)(!(company=mycompany)))"

Graham.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.