[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: searching on a DN
No, you misunderstood my question. Using the -b option searches a
specific object for the attribute. What I ask is how to do a subtree
search for one or more matching dn attribute values:
For instance, the filter:
(|(dn=cn=this one,ou=groups,o=me)(dn=cn=that one,ou=groups,o=me))
in a query such as:
ldapsearch -b 'o=me' -s sub 'filter like above' cn
The point is to find one of several entries by name...
This sort of query doesn't seem to be working for me. Should it?
-Alan
bernard.gardner@au.uu.net wrote:
>
> > Is it possible to search the directory for an entry with a
> > specific DN? For
> > instance, the query:
> >
> > ./ldapsearch '(dn=cn=Intranet Users,ou=Groups,o=Harris/NSS)' cn
>
> ldapsearch -s base -b "cn=Intranet Users,ou=Groups,o=Harris/NSS" \
> 'objectclass=*' cn
>
> This specifies a search with the BASE scope, with a base of the DN
> you want, a filter that should match any entry (every entry must
> have an objectclass attribute), returning only the cn attribute.
>
> Bernard.
> ---
> Bernard Gardner
> UUNET Asia Pacific Operations
>
> Email: Bernard.Gardner@au.uu.net
> Phone: +61 2 94332124
> Mobile: +61 4 12207040
> Fax: +61 2 94375888
> Mail: 39 Herbert St., St Leonards, NSW, Australia, 2065