I've been trying to write a simple perl script that will query the active
directory via LDAP and give me a list of email addresses for disabled users
(eg, addresses we don't want to accept email for anymore). I found a website
or two that suggested I use the following as my filter:

(&(objectCategory=person)(userAccountControl:1.2.840.113556.1.4.803:=2))

I was begining to think these websites were wrong as whenever I tried this
filter, I'd go no results. With other filters, I'd get the results I'd
expect to get. I then tried that filter in a couple other applications (one
MS tool and a PHP script running on the same box as my perl script) and it
worked as expected in those cases. In the intrest of testing, I created a
Net::LDAP::Filter object in my script and it seemed to parse the filter
fine. But when I try to run it via the search routine of Net::LDAP I get the
following error:

I/O Error   at ./gather_email.pl line 24, <DATA> line 283.


Unfortuantely, I'm not an LDAP expert by any means nor am I at all familiar
with the Net::LDAP code so I think I've hit a stand-still. Has anybody else
expierenced this (I did try a couple searches and came up empty). Or better
yet, does anybody know how to fix it :).


Thanks,
Jake


Reply via email to