[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: result counter problem from ldapsearch



On Wed, 20 Apr 2005 ckcheung@astri.org wrote:

Dear all,

I installed OpenLDAP version 2.2.23 on RedHat 7.3 and created a tree.
Nevertheless, I always obtain "result: 0 Success" from ldapsearch result
but actually it return an entry to me. Is there any setting or problem
with OpenLDAP I need to set in order to make the search result counter
works? Thx.

Below is the output of the ldapsearch.

[cut]
# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

The counter you seek is labeled "numEntries:", above.

The message after "result:" tells you whether there was an error
during your search and, if so, what it was.

Example:

    % ldapsearch -x -b dc=oowu,dc=edu -s base

    # extended LDIF
    #
    # LDAPv3
    # base <dc=oowu,dc=edu> with scope base
    # filter: (objectclass=*)
    # requesting: ALL
    #

    # search result
    search: 2
    result: 32 No such object

    # numResponses: 1

Note the error after "result:", in this case because I intentionally
misspelled the search base.

--
  Kirk Turner-Rustin       | Programmer/Analyst
  Ohio Wesleyan University | Libraries and Information Services
  http://www.owu.edu       | http://lis.owu.edu