Hi Jim, Thanks for the reply. Actuall yi havent used 's - it was just to demonstrate. And i did do an ldapsearch on the commandline with the same filter but it failed. The same filter with just the & replaced by | gave a result. I just cant seem to be able to combine to fields with an & to make a logical AND. OR and NOT work.
ANd the case of the existence test of attr=* - it fails to return anything sharib On Mon, 8 Dec 2003, Jim Harle wrote: > 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 > > > > > > >
