[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?

This would only work if the DN was an attribute. It's not, it's
the DN. It might look similar to an attribute in LDIF, but that's
an illusion.

But there's nothing to stop you addding an attribute called DN that
has the value of the DN of the entry (if that makes any sense). You'd
have to maintain that manually (by whatever process you use to add
entries to your directory), but it would let you do the searches
you want to do. There might even be an already existing objectclass
that would allow you to add a DN valued attribute called DN.

Bernard.