Increase limit from 1000?

前端 未结 2 2128
死守一世寂寞
死守一世寂寞 2021-02-11 04:42

When I do a search like so

my $mesg = $ldap->search(
  base   => \"OU=test,DC=example,DC=com\",
  scope  => \'one\',
  filter => \'(objectClass=organ         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-11 05:07

    AD by default set the maximum page size to 1000. The client will receive the first 1000 result and also an receive an error "Size Limit Exceeded".

    To avoid this the client has to use paged control, if the paged control is used the server will not return error but instead it will send a cookie (a byte) to indicate there is some more result available. If there is no cookie available which means no more result. So you can continue looping for the result until cookie is null.

    You can also modify MaxPageSize in the server if you want, start ntdsutil and type the following,

    ldap policies 
    connections 
    connect to server servername.domain.name 
    q 
    set maxpagesize to 5000 
    commit 
    changes 
    q 
    q
    

    This is mostly done if the client does not support paging and the client can not be modified.

提交回复
热议问题