--On Wednesday, October 11, 2006 3:24 PM +1300 Andrej Ricnik-Bay
<[EMAIL PROTECTED]> wrote:
Hi Guys,
We have an NDS directory that's (very poorly) maintained by a
third party. In this directory there are users with a weird zoo of
attributes. My task is that I need to find e-Mail addresses for users.
My search term is a userid that can be matched (in NDS) by
either cn or uid.
My problem is that if I filter for
(&(|(uid=$userid)(cn=$userid))(mail=*))
the query returns NOTHING if a user happens not to have
a cn or a uid, while what I was hoping to get one of them
because of the or.
Is there a way around this, did I overlook an obvious switch
or parameter that will make the query not silently fail? Right now
I've worked around this by running a second query for cn if
the one for uid doesn't return anything, but that seems quite
expensive.
Have you check the NDS log to see if the filter being logged is the filter
you specified in your script?
If you use this filter with ldapsearch, does it work?
Stanford used a Netscape DS for many years, and it sadly was prone to
silent DB corruption that had all sorts of interesting results.
--Quanah
--
Quanah Gibson-Mount
Principal Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html