Re: QUIPU search at root base level

Eric Rosenquist <> Tue, 26 September 1995 20:00 UTC

Received: from by IETF.CNRI.Reston.VA.US id aa14952; 26 Sep 95 16:00 EDT
Received: from CNRI.Reston.VA.US by IETF.CNRI.Reston.VA.US id aa14948; 26 Sep 95 16:00 EDT
Received: from by CNRI.Reston.VA.US id aa19324; 26 Sep 95 16:00 EDT
Received: from by with local SMTP id <>; Tue, 26 Sep 1995 19:10:20 +0100
Received: from by with Internet SMTP id <>; Tue, 26 Sep 1995 19:09:51 +0100
Received: from homer by with smtp (Smail3.1.28.1 #64) id m0sxeRi-000CjoC; Tue, 26 Sep 95 14:09 EDT
Message-Id: <>
Comments: Authenticated sender is <>
Sender: ietf-archive-request@IETF.CNRI.Reston.VA.US
From: Eric Rosenquist <>
Organization: Strata Software Limited
To: Stefan Thatcher <>
Date: Tue, 26 Sep 1995 14:09:18 -0400
Subject: Re: QUIPU search at root base level
Reply-to: Eric Rosenquist <>
Priority: normal
X-mailer: Pegasus Mail for Windows (v2.01)

On 26 Sep 95 at 11:02, Stefan Thatcher wrote:

> sorry I wasn't clear about what I'm trying to do. I spent most of Sunday getting
> mangled in the surf of Redcar beach and the brain cell has not yet relocated all
> it's synapses.
>  It's an **experimantal** DIT so real-world concerns about root level searches
> are not an issue at the moment. I'm also using LDAP and ldapsearch for my queries. 
> What I'm trying to do in this instance is return a list of all **countries** in
> the DIT, no sub-tree searching involved. I've set searchlevel=0 in qtailor and I've
> tried variations on the query
> ldapsearch -h LDAPserver-host -s one -b c=/ c=* c   
> All to no avail :-(     (mainly producing "Invalid DN syntax")
> snip
> > 
> > search @ -filter c=no
> > 
> Dish is quite happy with	"search @ -filter c=*"   but I can't figure out
> the LDAP equivilant.
> Regards,	Still-desperate, but-not-so-lonely 

Try something like:

	ldapsearch -h LDAPserver-host -s one -b '' 'c=*'

That will give you all of the attributes of the countries directly under the
root level.

The -b '' is needed to search the root of the DIT, otherwise you're searching 
under whatever DN was compiled into the LDAP sources.

The quotes are needed around 'c=*' to stop the shell from expanding the *.  
Alternatively, you could use c=\*

If you want to list all of the entries under the root level (rather than just 
the countries), use:

	ldapsearch -h LDAPserver-host -s one -b '' 'objectClass=*'

If you don't want to see all those attributes, i.e., you just want the DNs, 
use something like:

	ldapsearch -h LDAPserver-host -s one -b '' 'objectClass=*' 0.10

Any parameters after the filter are assumed to be attribute names.  There's 
no way in the LDAP protocol to specify 'no attributes', so you need to use a 
legal but unlikely OID, hence the use of "0.10".

Eric Rosenquist, Strata Software Limited
Email:   Tel: 613-591-1922  Fax: 613-591-3485
Quote: I don't know the scientific explanation, but fire made it good.
         -- Homer Simpson