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

Re: Still I am uanble to execute ldapsearch



Hello Chee Wai,

I run the ladpadd command as you says. with 'Test2.ldif' <Which consists of
Root dn > and 'Test1.ldif' <Which consists of sub dns>

now path given in slapd.conf filled with following details (i.e
/home/shreedhar/ldap/Lucid).

[root@devserv Lucid]# ls -l
total 168
-rw-------    1 root     root         8192 Jun  3 11:05 __db.001
-rw-------    1 root     root       270336 Jun  3 11:05 __db.002
-rw-------    1 root     root        98304 Jun  3 11:05 __db.003
-rw-------    1 root     root       368640 Jun  3 11:05 __db.004
-rw-------    1 root     root        16384 Jun  3 11:05 __db.005
-rw-------    1 root     root         8192 Jun  3 11:05 dn2id.bdb
-rw-------    1 root     root        32768 Jun  3 11:05 id2entry.bdb
-rw-------    1 root     root        56164 Jun  3 11:06 log.0000000001
-rw-------    1 root     root        20480 Jun  3 11:06 objectClass.bdb

While running ldapadd I got some output. I am attaching that output with
this mail for analysis

If I run search command I got the following information. (Success
information)

[root@devserv stixen]# /usr/local/bin/ldapsearch  -D
"cn=Lucid,o=stixen.co.uk,c=uk"  -b "o=stixen.co.uk,c=uk" -x -w secret
'ojectclass=*'
# extended LDIF
#
# LDAPv3
# base <o=stixen.co.uk,c=uk> with scope sub
# filter: ojectclass=*
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1

But if I tried to search other entires like may name

[root@devserv Lucid]# /usr/local/bin/ldapsearch  -D
"o=stixen.co.uk,c=uk"  -b "cn=Shreedhar B,c=uk" -x -w secret 'ojectclass=*'
ldap_bind: Inappropriate authentication (48)

May I know what is the problem in this.

Many Many thanks for your kind cooperation.

Regards,
Sreedhar






----- Original Message -----
From: "Chee Wai Yeung" <cheewai_yeung2003@yahoo.com.hk>
To: "shreedhar" <shreedhar@lucidindia.net>
Cc: "Chee Wai Yeung" <cheewai_yeung2003@yahoo.com.hk>
Sent: Monday, June 02, 2003 7:31 PM
Subject: Re: Still I am uanble to execute ldapsearch


> Do:
>
> /usr/local/bin/ldapadd -d 255 -D
> "cn=Lucid,o=stixen.co.uk,c=uk" -x -w secret -f
> /home/shreedhar/lldap/Test2.ldif
>
> and send me the output.
>
> Thanks
> Chee Wai
>
> --- shreedhar <shreedhar@lucidindia.net> wrote:
> > Hello Pohl and Chee Wai,
> >
> > I removed '-n' and included '-v' again I got
> > following error.
> >
> > [root@devserv stixen]# /usr/local/bin/ldapadd -x -v
> > -D "cn=Lucid,
> > o=stixen.co.u
> > k, c=uk" -w secret -f
> > /home/shreedhar/ldap/Test2.ldif
> > ldap_initialize( <DEFAULT> )
> > ldap_bind: Invalid credentials (49)
> > [root@devserv stixen]# /usr/local/bin/ldapadd -x -v
> > -D "cn=Lucid,
> > o=stixen.co.u
> > k, c=uk" -w secret -f
> > /home/shreedhar/ldap/Test1.ldif
> > ldap_initialize( <DEFAULT> )
> > ldap_bind: Invalid credentials (49)
> >
> > Thanks & Regards,
> > Sreedhar
> >
> > ----- Original Message -----
> > From: "Christian Pohl"
> > <list-openldap-software@mail2news-gw.secaron.de>
> > To: <openldap-software@OpenLDAP.org>
> > Sent: Monday, June 02, 2003 12:03 PM
> > Subject: Re: Still I am uanble to execute ldapsearch
> >
> >
> > > shreedhar wrote:
> > > > Hello Chris,
> > > >
> > > > Good Morning,
> > > >
> > > > If I attach ldif, I got message that data has
> > added.
> > > >
> > > > [root@devserv ldap]# /usr/local/bin/ldapadd -x
> > -n -D "cn=Lucid,
> > > > o=stixen.co.uk, c=uk" -w secret -f
> > /home/shreedhar/ldap/plip.ldif
> > > >
> > > > !adding new entry "o=stixen.co.uk, c=uk"
> > > >
> > > > !adding new entry "ou=People, o=stixen.co.uk,
> > c=uk"
> > > >
> > > > !adding new entry "ou=Architecture,
> > o=stixen.co.uk, c=uk"
> > > >
> > > > !adding new entry "ou=Developement,
> > o=stixen.co.uk, c=uk"
> > > >
> > > > !adding new entry "ou=Communications,
> > ou=Developement, o=stixen.co.uk,
> > c=uk"
> > > >
> > > > !adding new entry "ou=Applications,
> > ou=Developement, o=stixen.co.uk,
> > c=uk"
> > > >
> > > > !adding new entry "cn=Rick Stones, ou =people,
> > o=stixen.co.uk, c=uk"
> > > >
> > > > !adding new entry "cn=Sreedhar B, ou =people,
> > o=stixen.co.uk, c=uk"
> > > >
> > > > !adding new entry "cn=Arun Lal, ou =people,
> > o=stixen.co.uk, c=uk"
> > > >
> > > > IF I tried to search,
> > > >
> > > > [root@devserv stixen]# /usr/local/bin/ldapsearch
> > -n -D "o=stixen.co.uk,
> > > > c=uk"
> > > > -b "o=stixen.co.uk, o=uk" -x -W 'ojectclass=*'
> > > > Enter LDAP Password:secret(given by me)
> > > > ldap_bind: Invalid credentials (49)
> > > >
> > > > I had given directory as
> > '/home/shreedhar/ldap/stixen/ ', But no files
> > has
> > > > created that directory after adding entries.
> > > >
> > > > I am attching 'slapd.conf' and 'plip.ldif' files
> > which I used for this.
> > > >
> > > > I am very sorry for giving trouble to you all
> > every time.
> > > >
> > > > With Best Regards,
> > > >
> > > > Sreedhar
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Christian Pohl"
> > <list-openldap-software@mail2news-gw.secaron.de>
> > > > To: <openldap-software@OpenLDAP.org>
> > > > Sent: Friday, May 30, 2003 7:26 PM
> > > > Subject: Re: Still I am uanble to execute
> > ldapsearch
> > > >
> > > >
> > > >
> > > >>shreedhar wrote:
> > > >>
> > > >>>Hello Christian Pohl ,
> > > >>>
> > > >>>I modified slapd.conf file suffix as well as
> > rootdn
> > > >>>
> > > >>>If I execute the following command
> > > >>>
> > > >>>1. [root@devserv Database]#
> > /usr/local/bin/ldapadd  -n  -D "cn=Manager,
> > > >>>o=stixen.co.uk, c=uk(objectclass=organization)"
> > -w secret
> > > >>>
> > > >>>I have not got any prompt
> > > >>
> > > >>that's correct. It's waiting for your input! you
> > are successfully
> > > >>authenticatet (no error is displayed) :-) If you
> > do not use -f
> > > >><ldif-file>, then ldapadd reads from stdin.
> > > >>
> > > >>Just type the entries you want to add in the
> > same way you would type it
> > > >>in an ldif
> > > >>or just use the additional -f <ldif-file> to add
> > you entries.
> > > >>
> > > >>And Remember 1st. the tree beginning from our
> > root (=suffix in
> > slapd.conf)
> > > >>and at last: the leaves (your user)
> > > >>
> > > >>Kind regards,
> > > >>
> > > >>Chris
> > > >>
> > > >>
> > > >>--
> > > >>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>
> > > >>
> > >
> > > Hi,
> > >
> > > leave away the -n flag from your ldapadd:
> > >
> > > from man ldapadd:
> > >
> > >          -n     Show what would be done, but
> > don't  actually  modify
> > > entries.
> > >       Useful for debugging in conjunction with -v.
> > >
> > > the manual pages are your friend!
> > > http://www.openldap.org --> manual pages
> > >
> > > Kind regards,
> > >
> > > Chris
> > >
> > > --
> > > 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>
> > >
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
>
[root@devserv ldap]# /usr/local/bin/ldapadd -d 255 -D "o=stixen.co.uk,c=uk" -x
-w secret -f /home/shreedhar/ldap/Test1.ldif
ldap_create
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 4 tm: -1 async: 0
ldap_ndelay_on: 4
ldap_is_sock_ready: 4
ldap_ndelay_off: 4
ldap_int_sasl_open: host=devserv
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 39 bytes to sd 4
  0000:  30 25 02 01 01 60 20 02  01 03 04 13 6f 3d 73 74   0%...` .....o=st
  0010:  69 78 65 6e 2e 63 6f 2e  75 6b 2c 63 3d 75 6b 80   ixen.co.uk,c=uk.
  0020:  06 73 65 63 72 65 74                               .secret
ldap_write: want=39, written=39
  0000:  30 25 02 01 01 60 20 02  01 03 04 13 6f 3d 73 74   0%...` .....o=st
  0010:  69 78 65 6e 2e 63 6f 2e  75 6b 2c 63 3d 75 6b 80   ixen.co.uk,c=uk.
  0020:  06 73 65 63 72 65 74                               .secret
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: localhost  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Tue Jun  3 11:11:02 2003

** Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ldap_read: want=8, got=8
  0000:  30 0c 02 01 01 61 07 0a                            0....a..
ldap_read: want=6, got=6
  0000:  01 30 04 00 04 00                                  .0....
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x08089568 ptr=0x08089568 end=0x08089574 len=12
  0000:  02 01 01 61 07 0a 01 30  04 00 04 00               ...a...0....
ldap_read: message type bind msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x08089568 ptr=0x0808956b end=0x08089574 len=9
  0000:  61 07 0a 01 30 04 00 04  00                        a...0....
read1msg:  0 new referrals
read1msg:  mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x08089568 ptr=0x0808956b end=0x08089574 len=9
  0000:  61 07 0a 01 30 04 00 04  00                        a...0....
ber_scanf fmt (}) ber:
ber_dump: buf=0x08089568 ptr=0x08089574 end=0x08089574 len=0

ldap_msgfree
ldap_perror
ldap_bind: Inappropriate authentication (48)
[root@devserv ldap]#
[root@devserv ldap]# /usr/local/bin/ldapadd -d 255 -D "cn=Lucid,o=stixen.co.uk,
c=uk" -x -w secret -f /home/shreedhar/ldap/Test2.ldif
ldap_create
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 4 tm: -1 async: 0
ldap_ndelay_on: 4
ldap_is_sock_ready: 4
ldap_ndelay_off: 4
ldap_int_sasl_open: host=devserv
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 48 bytes to sd 4
  0000:  30 2e 02 01 01 60 29 02  01 03 04 1c 63 6e 3d 4c   0....`).....cn=L
  0010:  75 63 69 64 2c 6f 3d 73  74 69 78 65 6e 2e 63 6f   ucid,o=stixen.co
  0020:  2e 75 6b 2c 63 3d 75 6b  80 06 73 65 63 72 65 74   .uk,c=uk..secret
ldap_write: want=48, written=48
  0000:  30 2e 02 01 01 60 29 02  01 03 04 1c 63 6e 3d 4c   0....`).....cn=L
  0010:  75 63 69 64 2c 6f 3d 73  74 69 78 65 6e 2e 63 6f   ucid,o=stixen.co
  0020:  2e 75 6b 2c 63 3d 75 6b  80 06 73 65 63 72 65 74   .uk,c=uk..secret
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: localhost  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Tue Jun  3 11:06:01 2003

** Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ldap_read: want=8, got=8
  0000:  30 0c 02 01 01 61 07 0a                            0....a..
ldap_read: want=6, got=6
  0000:  01 00 04 00 04 00                                  ......
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x08089578 ptr=0x08089578 end=0x08089584 len=12
  0000:  02 01 01 61 07 0a 01 00  04 00 04 00               ...a........
ldap_read: message type bind msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x08089578 ptr=0x0808957b end=0x08089584 len=9
  0000:  61 07 0a 01 00 04 00 04  00                        a........
read1msg:  0 new referrals
read1msg:  mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x08089578 ptr=0x0808957b end=0x08089584 len=9
  0000:  61 07 0a 01 00 04 00 04  00                        a........
ber_scanf fmt (}) ber:
ber_dump: buf=0x08089578 ptr=0x08089584 end=0x08089584 len=0

ldap_msgfree
adding new entry "o=stixen.co.uk, c=uk"
ldap_add_ext
ldap_send_initial_request
ldap_send_server_request
ber_flush: 88 bytes to sd 4
  0000:  30 56 02 01 02 68 51 04  14 6f 3d 73 74 69 78 65   0V...hQ..o=stixe
  0010:  6e 2e 63 6f 2e 75 6b 2c  20 63 3d 75 6b 30 39 30   n.co.uk, c=uk090
  0020:  13 04 01 6f 31 0e 04 0c  73 74 69 78 65 6e 2e 63   ...o1...stixen.c
  0030:  6f 2e 75 6b 30 22 04 0b  6f 62 6a 65 63 74 63 6c   o.uk0"..objectcl
  0040:  61 73 73 31 13 04 03 74  6f 70 04 0c 6f 72 67 61   ass1...top..orga
  0050:  6e 69 7a 61 74 69 6f 6e                            nization
ldap_write: want=88, written=88
  0000:  30 56 02 01 02 68 51 04  14 6f 3d 73 74 69 78 65   0V...hQ..o=stixe
  0010:  6e 2e 63 6f 2e 75 6b 2c  20 63 3d 75 6b 30 39 30   n.co.uk, c=uk090
  0020:  13 04 01 6f 31 0e 04 0c  73 74 69 78 65 6e 2e 63   ...o1...stixen.c
  0030:  6f 2e 75 6b 30 22 04 0b  6f 62 6a 65 63 74 63 6c   o.uk0"..objectcl
  0040:  61 73 73 31 13 04 03 74  6f 70 04 0c 6f 72 67 61   ass1...top..orga
  0050:  6e 69 7a 61 74 69 6f 6e                            nization
ldap_result msgid 2
ldap_chkResponseList for msgid=2, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 2
wait4msg continue, msgid 2, all 1
** Connections:
* host: localhost  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Tue Jun  3 11:06:01 2003

** Outstanding Requests:
 * msgid 2,  origid 2, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=2, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 2, all 1
ber_get_next
ldap_read: want=8, got=8
  0000:  30 0c 02 01 02 69 07 0a                            0....i..
ldap_read: want=6, got=6
  0000:  01 00 04 00 04 00                                  ......
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x08089668 ptr=0x08089668 end=0x08089674 len=12
  0000:  02 01 02 69 07 0a 01 00  04 00 04 00               ...i........
ldap_read: message type add msgid 2, original id 2
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x08089668 ptr=0x0808966b end=0x08089674 len=9
  0000:  69 07 0a 01 00 04 00 04  00                        i........
read1msg:  0 new referrals
read1msg:  mark request completed, id = 2
request 2 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 2, msgid 2)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x08089668 ptr=0x0808966b end=0x08089674 len=9
  0000:  69 07 0a 01 00 04 00 04  00                        i........
ber_scanf fmt (}) ber:
ber_dump: buf=0x08089668 ptr=0x08089674 end=0x08089674 len=0

ldap_msgfree

ldap_unbind
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 4
  0000:  30 05 02 01 03 42 00                               0....B.
ldap_write: want=7, written=7
  0000:  30 05 02 01 03 42 00                               0....B.
ldap_free_connection: actually freed
[root@devserv ldap]#