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

searching over multiple DNs



Hey guys, I'm new to LDAP so my terminology is probably off. My question
seems like it should be really obvious, but searching many archives hasn't
told me if this is possible or not.

I've got a couple different suffixes, like so:

database dbd
suffix   "dc=foo,dc=com"

database dbd
suffix   "dc=bar,dc=net"

Each one is populated, and I can search for entries just fine if I use a
proper basedn like so:

ldapldapsearch -x -b 'dc=foo,dc=com' '(mail=bench@foo.com)'
ldapldapsearch -x -b 'dc=bar,dc=net' '(mail=bench@foo.net)'


Okay, so what I want to do is to make one search that searches across all 
my suffixes. I saw some stuff out there indicating this was possible if I 
just search the root of the ldap tree, which I would think would mean 
giving the -b option a null string (-b ''). But that returns no results.

Like I said, I'm new to LDAP, so the analogy in my head is that the ldap
database is sorta like a unix directory tree. While I can currently search
for /dc=foo,dc=com/bench or /dc=bar,dc=net/bench, I want to search for
/*/bench. Does that make sense? Is that possible?