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

Ldapsearch Error while using Back-NDB



Hi,

An error comes while searching in ldap compiled with NDB support.

To reproduce the issue:

1) Import the below sample.ldif file to the database by issuing the
following command:
        /usr/local/sbin/slapadd -l sample.ldif

sample.ldif:

dn: dc=dimdim,dc=com
dc: dimdim
description: My wonderful company as much text as you want to place 
 in this line up to 32K continuation data for the line above must 
 have <CR> or <CR><LF> i.e. ENTER works 
 on both Windows and *nix system - new line MUST begin with ONE SPACE
objectClass: dcObject
objectClass: organization
o: Example, Inc.

dn: ou=people, dc=dimdim,dc=com
ou: people
description: All people in organisation
objectclass: organizationalunit

dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectclass: inetOrgPerson
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
sn: smith
uid: rjsmith
userpassword: rJsmitH
carlicense: HISCAR 123
homephone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
description: swell guy
ou: Human Resources

2) Start the ldap server and issue the command to search:
        ldapsearch -H ldap://192.168.3.47 -x -D "dc=dimdim,dc=com" -b
"dc=dimdim,dc=com" -w dimdim "(uid=rjsmith)"

3) It will return multiple results and that is the issue we are facing.

Output of the command:
# extended LDIF
#
# LDAPv3
# base <dc=dimdim,dc=com> with scope subtree
# filter: (uid=rjsmith)
# requesting: ALL
#

# Robert Smith, people, dimdim.com
dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectClass: inetOrgPerson
userPassword:: ckpzbWl0SA==
description: swell guy
sn: smith
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
ou: Human Resources
carLicense: HISCAR 123
homePhone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
uid: rjsmith

# Robert Smith, people, dimdim.com
dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectClass: inetOrgPerson
userPassword:: ckpzbWl0SA==
description: swell guy
sn: smith
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
ou: Human Resources
carLicense: HISCAR 123
homePhone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
uid: rjsmith

# Robert Smith, people, dimdim.com
dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectClass: inetOrgPerson
userPassword:: ckpzbWl0SA==
description: swell guy
sn: smith
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
ou: Human Resources
carLicense: HISCAR 123
homePhone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
uid: rjsmith

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

Kindly provide a solution for the same.

-- 
Best Regards,
Priyesh Potdar
Dimdim Inc.