The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: [OT] LDAP query syntax


  • Subject: Re: [OT] LDAP query syntax
  • From: "Paul Bendall" <paul@xxxxxxxxxxxxxxxxx>
  • Date: Sat, 16 Feb 2008 17:06:40 -0000

Okay I think I see what you mean but you need to search for
something before you exclude something else. I've tried the
following using LDP.exe

(&(!(samaccountname=ben*))(objectcategory=*))

The above returns all objects which do not have a user ID starting
ben and this gives me a collection.

Paul

--- In ukha_d@xxxxxxx, "Paul Gordon" <paul@...> wrote:
>
> I'm trying to filter objects in active directory based on which OU
> they're in by referencing the "distinguishedName" property.
>
> I can construct a query that successfully returns users which ARE
in a
> given OU, as follows:
>
> (distinguishedName=*OU=Testing,DC=domain,DC=com)
>
> Using the wildcard, because the distinguishedName property
includes the
> object name as well. - running a query using this filter correctly
> returns all objects within the "Testing" OU in the AD Domain
> "domain.com"
>
> What I now want to do is put a logical NOT operator on the
condition, so
> that the query returns all objects that are *not* in a given OU...
just
> amending the filter to:
>
> (!(distinguishedName=*OU=Testing2,DC=domain,DC=com)
>
> Does not appear to work, - my query returns no objects when I run
> this...
>
> Any ideas?
>
> Paul G.
>
>
> -----Original Message-----
> From: ukha_d@xxxxxxx [mailto:ukha_d@xxxxxxx] On
Behalf
> Of Paul Bendall
> Sent: 16 February 2008 12:22
> To: UKHA Group
> Subject: [ukha_d] Re: [OT] LDAP query syntax
>
> What you trying to do?
>
> Paul
>
> --- In ukha_d@xxxxxxx, "Paul Gordon" <paul@> wrote:
> >
> > Any LDAP "experts" here who might be able to answer a
question
for
> me
> > regarding a problem I'm having trying to construct a particular
> query
> > condition?
> >
> >
> >
> > TIA
> >
> >
> >
> > Paul G.
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
> **** Sponsored By http://www.Berble.com ****
> ****       Computers You Carry          ****
>
>
>
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.20.6/1282 - Release Date:
> 15/02/2008 19:08
>





UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.