From: Mark W. <mew...@un...> - 2000-11-20 15:06:29
|
the NOT, must precede the () just like the AND thus try : (&(!(lastlogintime=*))(objectclass=inetorgPerson)) mark Sim...@wi... wrote: > Hi, > > I am struggling with composing a filter and I hope someone on the list can > point me in the right direction. > > > I am using Net::LDAP v0.19, perl 5.005_03 against Novell eDirectory > > The script I am working on is to display a list of users who have never > logged on to the network. > > This is stored in the LDAP attribute lastLoginTime in eDirectory. > > If I make the filter (& (objectclass=inetOrgPerson) (lastLoginTime=*)) I > get a list of the users who have logged in. > > Can I somehow reverse this so that I get a list of those who do NOT have a > lastLoginTime attribute ? > > I tried the obvious (& (objectclass=inetOrgPerson) (lastLoginTime!=*)) but > that just died with a "Bad filter" error. > > It seems that Novell does not return an attribute at all rather than an > attribute that has a null value. > > My workaround is just to get all the users and then test for the attribute > in the return list but it isn't going to scale very well ;-) > > All help much appreciated. > > Rgds, > > Simon Wilcox > Intranet Development Manager > Williams Lea Group > > ______________________________________________________________________ > > This email contains proprietary information some or all of which may be > legally privileged. It is for the intended recipient only. If an addressing > or transmission error has misdirected this email, please notify the author by > replying to this email. If you are not the intended recipient you must not > use, disclose, distribute, copy, print, or reply on this email. |