Hi, On Wednesday, 11. October 2006 04:24, Andrej Ricnik-Bay 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.
The filter looks O.K. to me. It should match objects that have the mail attribute set and uid=$userid or cn=$userid. I.e. it suffices if one of uid or cn matches. Do you mean it fails to find entries that have the uid attribute set, but miss the cn attribute (or vice versa)? It so, then it might be a problem with the data in the directory or the directory configuration. Regars Peter -- Peter Marschall [EMAIL PROTECTED]