in reply to Re: ldap query only returning 1k lines
in thread ldap query only returning 1k lines

I think this is getting closer. When I see you're line:
# How many LDAP query results to grab for each paged round # Set to under 1000 for Active Directory my $page = Net::LDAP::Control::Paged->new( size => 100 );
I see you are set to 100. If I set mine to 100, I only get 100 entries. If I set mine to 1000, I get 1000 lines. If I set it any higher than 1000, I still only get 1000 entries. Does that ring any bells for anyone or jive?

Replies are listed 'Best First'.
Re^3: ldap query only returning 1k lines
by NetWallah (Canon) on May 13, 2009 at 23:44 UTC
    From http://support.microsoft.com/kb/315071, You can use NTDSUTIL to define policy/ parameters:

    MaxPageSize - This value controls the maximum number of objects that are returned in a single search result, independent of how large each returned object is. To perform a search where the result might exceed this number of objects, the client must specify the paged search control. This is to group the returned results in groups that are no larger than the MaxPageSize value. To summarize, MaxPageSize controls the number of objects that are returned in a single search result.

    Default value: 1,000

         ..to maintain is to slowly feel your soul, sanity and sentience ebb away as you become one with the Evil.

      OK, I love the explanation, and I hope that it works, but why would the query still return more that 1k results when run from windows? Thanks again!
      I love the explanation, and I hope it works, but why would the query from a windows machine return all of the records but not the UNIX query?
        Your Windows code uses WMI (Not LDAP) - which is not subject to the 1K limit.

             ..to maintain is to slowly feel your soul, sanity and sentience ebb away as you become one with the Evil.