[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Problem in the search with OpenLDAP

On 23-Jun-99 Benito Fernandez Garcia wrote:
> I have built a tree with 3 levels. The first level is the root (o=company,
> c= ES), the second level is the objectclass "persona" and the third level
> is the objectclass "ordenador". So, my organization (the root) is composed
> by "persona" (like person) and each person can have one or severals
> "ordenador" (like PC).
> Well my problem is that the search of any atribute (belong to "persona" or
> belong to "ordenador") go well if I set the starting point for the search
> as the root (o=Company, c=es).
> example : ldapsearch -s sub -b "o=company,c=es" "attribute=something"
> -----> Ok !
> The problem comes when I set the starting point for the search in other
> point.
> example: ldapsearch -s sub -b "name=John,o=company,c=es" "attribute
> something"  ----> Wrong

You can't use arbitrary attributes when specifying a search base. You need to
do something like:

ldapsearch -s sub -b o=company,c=es name=John

You can modify the base by specifying a node below the root. For example, if
o=company,c=ES branches into ou=persona then you can do:

ldapsearch -s sub -b ou=persona,c=es name=John

Jason Bodnar + jbodnar@tivoli.com + Tivoli Systems

[Another Normism ...]
Beer, Norm?
Yeah, that's it.