LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 28th, 2009, 09:39 PM
MargieRoginski MargieRoginski is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 1 MargieRoginski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 42 sec
Reputation Power: 0
How to get all objects from ldap when size limit exceeded is generated?

I'm trying to figure out how I get all objects of a certain type from my ldap server. For example, I would like to get all aliases with a command like this:

ldapsearch -LLL -x -b "dc=xyz,dc=com" -h <my_ldap_server> "(&(objectclass=group))" dn

However I get a size limit exceeded error. What is the approach one uses to get all data when it's a lot and exceeds the size limit?

I could use a really bone headed approach like get all that start with "A", all that start with "B", etc, but then I run into the problem where there even might be too many that start with a particular letter. Is there some general solution to this problem other than writing a fairly complex program to solve this?

Thanks,

Margie

Reply With Quote
  #2  
Old October 31st, 2009, 04:10 PM
ldapswandog ldapswandog is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2009
Location: Charlotte, NC
Posts: 111 ldapswandog User rank is Corporal (100 - 500 Reputation Level)ldapswandog User rank is Corporal (100 - 500 Reputation Level)ldapswandog User rank is Corporal (100 - 500 Reputation Level)ldapswandog User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 18 m
Reputation Power: 8
based on the -x in the ldapsearch it appears you using openLDAP, so you need the SA to setup the sizelimit so you can retrieves all the entries

sizelimit

The sizelimit directive specifies the number of entries to return to a search request. There are two forms of this command, first form:

sizelimit integer | unlimited

Where integer is value between 1 and 65435. unlimited (or -1) places no limits on the number of returned results.

The second form provides more control over the number of returned results and has the following format:

sizelimit size[.{soft|hard|unchecked}]=integer

Where integer is the maximum number of entries slapd will return answering a search request. The behaviour of the directive depends on the optional qualifier soft, hard or unchecked as follows:

1. If no size limit is explicitly requested by the client, the soft limit is used.
2. If the requested size limit exceeds the hard limit, an "Administrative limit exceeded" is returned.
3. If the hard limit is set to 0 or to the keyword "soft", the soft limit is used in either case.
4. If the hard limit is set to -1 or to the keyword "none", no hard limit is enforced.
5. Explicit requests for size limits smaller or equal to the hard limit are honored.
6. The unchecked qualifier sets a limit on the number of candidates a search request is allowed to examine. If the selected candidates exceed the unchecked limit, the search will abort with LDAP_UNWILLING_TO_PERFORM (53, x'35). If unchecked is set to -1 or to the keyword "none", no limit is applied (the default).
7. If no qualifier is present, the value is assigned to the soft limit, and the hard limit is set to zero, to preserve the original behavior.

If no sizelimit directive is defined the default is 500. Examples:

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > How to get all objects from ldap when size limit exceeded is generated?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap