Stranger and stranger.  I just did a comparison of the two searches.
The top-down one gets 265 out of 651 objects in the OU.  I am beginning
to suspect some limit on the number of returned objects allowed.  I seem
to recall once hitting a 1000-object limit on AD LDAP returns - which is
killing for ADs of our size. 



jj

John Thayer Jensen, System Administrator
Computing Service, School of Business
University of Auckland

Room 256, 15 Wynyard Street

voice: +64 9 373-7599 ext 87543
FAX: +64 9 373-7696
mobile: +64 21 049-7702
quickdial: 60001

http://staff.business.auckland.ac.nz/~j.jensen
-----Original Message-----
From: Jensen, John T 
Sent: Tuesday, 6 July 2004 8:34 a.m.
To: [EMAIL PROTECTED]
Subject: Scope=>'sub' not working??

I'm trying to search the whole of our AD for computer objects (using the
Perl Net::LDAP module).  I just put in as searchbase:

my $searchbase='DC=com,DC=unet,DC=auckland,DC=ac,DC=nz';

Looking for computers so I put in:

my $filter="(&(objectclass=User)(objectcategory=computer))";

I do a search:

my
$results=$ad->search(base=>$searchbase,filter=>$filter,attrs=>$attrs);

(scope=>'sub' is supposed to be the default, but I have also tried with:

my
$results=$ad->search(base=>$searchbase,filter=>$filter,scope=>'sub',attr
s=>$attrs);

)

I don't get everything.  If I put in a full OU:

my $searchbase='OU=Staff Computers,OU=COM
Computers,DC=com,DC=unet,DC=auckland,DC=ac,DC=nz';

I get objects under that OU.  I haven't yet looked to see whether my
scope=>'sub' search gets some of those computers or not.  But I don't
want to look under a particular OU; I want to look in the whole AD - one
of the things I am looking for is computers that have got into the wrong
location. 



jj

John Thayer Jensen, System Administrator Computing Service, School of
Business University of Auckland

Room 256, 15 Wynyard Street

voice: +64 9 373-7599 ext 87543
FAX: +64 9 373-7696
mobile: +64 21 049-7702
quickdial: 60001

http://staff.business.auckland.ac.nz/~j.jensen

Reply via email to