Sharib,
  The only thing I see wrong with your query is the use of 's in #2 and you may
not have meant that literally since it wouldn't work with | either. This is, a
filter of (&(sn=Jones)(givenname=Bob)) is correct, but
(&(Sn='Jones')(givenname='Bob')) is most likely wrong since you realy don't
want 's in your directory entries.  If you didn't mean the 's, then you have
done something else wrong, which can't be detected from your message.  Try
using a filter in another tool like ldapsearch, the copying that and pasting it
into your perl code.  The reverse might not work because Net::LDAP is more
forgiving about missing outer ()s than ldapsearch.

  --Jim Harle

On Fri, 5 Dec 2003, Graham Barr wrote:

> Begin forwarded message:
> > From: [EMAIL PROTECTED]
> > Date: 5 December 2003 22:23:49 GMT
> > To: [EMAIL PROTECTED]
> > Subject: ldap search filter problem
> > Message-Id: <[EMAIL PROTECTED]>
> >
> > Hi,
> >
> > I am having trouble doing a existing filter search on my LDAP
> > directory.
> > My LDAP directory is openLDAP v3 server. I am using the Net:::LDAP API
> > for
> > my querires. I cant do a search with a filter like
> >
> > 1. (attr=*)
> > 2.( &( attr='value')(attr1='value1'))
> > The search number 2 runs perfectly if the & is replaced by |
> >
> > Can you exaplin why this is happening
> >
> > Sincerely,
> > Sharib khan
> >
>

Reply via email to