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

Re: Search Result is result: 32 No such object



shreedhar wrote:
Hi All,

My ldif file consists of following info

dn: cn=June Rossi, ou=accounting, o=Ace Industry, c=US
cn: June Rossi
sn: Rossi
givenName: June
mail: rossi@aceindustry.com
userPassword: {sha}KDIE3AL9DK
telephoneNumber: 2616
roomNumber: 220
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson

dn: cn=Marc Chambers, ou=manufacturing, o=Ace Industry, c=US
cn: Marc Chambers
sn: Chambers
givenName: Marc
mail: chambers@aceindustry.com
userPassword: {sha}jdl2alem87dlacz1
telephoneNumber: 2652
roomNumber: 167
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson

If I run through ldapsearch command

[root@devserv Database]# ldapsearch -x -b 'o=Ace,c=US' 'objectclass=*' -f sample1.ldif
# extended LDIF
#
# LDAPv3
# base <o=Ace,c=US> with scope sub
# filter pattern: objectclass=*
# requesting: ALL
#

#
# filter: objectclass=*
#
# search result
search: 2
result: 32 No such object

# numResponses: 1
[root@devserv Database]#

What will be error in this. I run search command in the path where sample1.ldif exists.
Any one can let me know how can i search required record and how.

Regards,
Sreedhar

Our greatest happiness in life does not depend on the condition of life in which chance has placed us, but is always the result of good conscience, good health, occupation, and freedom in all just pursuits


from man ldapsearch

-f file
	      Read a series of lines from file, performing one LDAP search for
	      each line.  In this case, the filter given on the  command  line
	      is  treated  as  a  pattern  where the first occurrence of %s is
	      replaced with a line from file.  If file is a single  -  charac-
	      ter, then the lines are read from standard input.

you ldif is of the form that you use to add the entrei to your directory, not for user with ldapsearch.

have you added the entzries to you directory with ldapadd?
ldapadd -x -D "..." -w -f sampl1.ldif


-- Christian Pohl »|secaron

--
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to Christian Pohl <pohl@secaron.de>