[Date Prev][Date Next]
Re: Extended attrs search
Hi and sorry for the lapsus...
I'll try to explain it better.
If I were using "ldapsearch" in a manual way I should not have problems.
The problem is that I'm trying to create a mail groups through a dynamic
query. I only have the next values:
LDAP_LOGIN (global parameter)
LDAP_PASSWORD (global parameter)
BASE_DN (global parameter)
As you can see just the FILTER is the variable value. Then, If I want to
limit the results of a query only to a OU, the only way to do it is
using extended ldapfilter attrs like:
ldapsearch -x -h ideafix -D cn=Manager,o=Enterprise,c=ES -w password
This is a simulation. The only parameter I can change is the filter. All
the other ones are fixed.
And the problem resides in my OpenLDAP server. It returns no answer. The
other one (a replica of the first one) returns 16 elements (as I
expect). The query es exactly the same. I just change the "-h ideafix"
with "-h tiko".
I hope to have explained it better!
Tx a lot!
Dhiren Pankhania wrote:
I am not clear on your question of limiting. Do you want to limit to the
base DN, or the number of searches returned or I assuming you mean the
search filter, see below.
Set your search base dn and for further rules on your search filter you
can use the following conditions;
& and operator
! Not operator
| or operator
You can combine these for your search i.e. (|(val)(val)) or
From: Saxa Egea [mailto:email@example.com]
Sent: 10 September 2004 12:05
To: Dhiren Pankhania
Subject: Re: Extended attrs search
yeah! This is exactly what I'm looking for.
I couldn't do it. I know that I can type "-b ou=Systems,ou=it,..."
but I need to write this because qmail (and also a lot of services) only
let you type a "basedn" and all queries are recursive. This is why I
need to limit the results of my query through the filter.
Dhiren Pankhania wrote:
> Are you trying to search under
> ou=systems,ou=it,ou=central,o=enterprise,c=es ?
> If yes, use the switch on ldapsearch -b (for base) and put in the
> above DN. Take out the & as these are conditions on what you are
> searching, but keep the objectclass you want the search to return.
> You can do ldapsearch -? It lists your options.
> -----Original Message-----
> From: Saxa Egea [mailto:firstname.lastname@example.org]
> Sent: 10 September 2004 11:36
> To: OpenLDAP-software@OpenLDAP.org
> Subject: Extended attrs search
> Hi all!
> I have compiled OpenLDAP 2.2.15 and compiled with:
> ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/sbin
> --enable-wrappers --enable-aclgroups --enable-spasswd --enable-dynamic
> --enable-shared --with-tls --with-cyrus-sasl --enable-aci
> --enable-ldbm --enable-rewrite --enable-meta --enable-ldap
> --enable-monitor --enable-crypt -q
> All seems ok.
> But I have a problem search with extended attributes.
> My Basedn is o=Enterprise,c=ES
> ldapsearch -x -h ideafix -D cn=Manager,o=Enterprise,c=ES -w password
> It should return 16 entries but nothing is reported. No error reports
> I need something else when compiling openldap?
> I make the same query to a backup openldap server (replica) running
> openldap 2.1.20 and it returns 16 accouns (as I expect!)...
> I Need help... Running slapd in verbose mode doesn't report errors.
> Tx a lot!