I'm trying to search for (&(objectclass=InetOrgPerson) (uid=*))
In other words, I want to list every human I have in my db, so I can build a
list of users in order to synchronise an LDAP server with a non-LDAP
compliant server.
Using the following code:
my $filter="(&(objectclass=InetOrgPerson) (uid=*))";
my $ldap = new Mozilla::LDAP::Conn($host,$port,$dn,$passwd) || die("Failed
to open connect.\n");
my $entry=$ldap->search($base, "subtree", $filter, 0, @attribs);
This search returns nothing. Zip. The way the docs read on the =* operator,
all antries that have a value for the attribute on the left should be
listed. I get nothing.
If I modify the search to use, for example, "(uid=a*)", the search works,
and I get about 200 people whose uid's begin with "a". To the best of my
knowledge, that isn't right, and would introduce much lameness and stupidity
into my script by having to iterate through the entire alphabet to get
everybody.
Nothing about this exists on the FAQ, and bugfixes listed in 1.4.1 do not
mention this issue.
Any ideas out there?