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

ldapsearch -y works great, -w barks



Howdy,

I'm confused as to why an operation with the -y filename works great, but the same operation with the -w pw
dies with "ldap_bind: Invalid credentials (49)".

The first file I've attached is with the -y, it works.  The second is with the -w.  I did notice the
difference where the working one had a "." at the end of the pw, which was not present when using the -w
option.  To make sure I was not entering a typo on the commandline pw, I wrote a quick script, just a

   #!/bin/sh

   P=`cat p2`
   echo "|$P|"

   ldapsearch -v -d -1 -x -w "$P" -D cn=manager,dc=earlham,dc=edu -b ou=People,dc=earlham,dc=edu -h xaga

This also died with invalid credentials after printing out the pw.

Anybody have an idea what's going on?

--
 Randy    (schulra@earlham.edu)      765.983.1283         <*>

nosce te ipsum
ldapsearch -v -d -1 -x -y p2 -D cn=manager,dc=earlham,dc=edu -b ou=People,dc=earlham,dc=edu -h xaga
ldap_initialize( ldap://xaga )
ldap_create
ldap_url_parse_ext(ldap://xaga)
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP xaga:389
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 159.28.1.98:389
ldap_pvt_connect: fd: 3 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
ber_scanf fmt ({it) ber:
ber_dump: buf=0x80103f000 ptr=0x80103f000 end=0x80103f036 len=54
  0000:  30 34 02 01 01 60 2f 02  01 03 04 1c 63 6e 3d 6d   04...`/.....cn=m  
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 61 72 6c 68 61   anager,dc=earlha  
  0020:  6d 2c 64 63 3d 65 64 75  80 0c 73 75 70 65 72 73   m,dc=edu..supers  
  0030:  65 63 52 45 54 0a                                  ecret.            
ber_scanf fmt ({i) ber:
ber_dump: buf=0x80103f000 ptr=0x80103f005 end=0x80103f036 len=49
  0000:  60 2f 02 01 03 04 1c 63  6e 3d 6d 61 6e 61 67 65   `/.....cn=manage  
  0010:  72 2c 64 63 3d 65 61 72  6c 68 61 6d 2c 64 63 3d   r,dc=earlham,dc=  
  0020:  65 64 75 80 0c 73 75 70  65 72 73 65 63 52 45 54   edu..supersecret  
  0030:  0a                                                 .                 
ber_flush2: 54 bytes to sd 3
  0000:  30 34 02 01 01 60 2f 02  01 03 04 1c 63 6e 3d 6d   04...`/.....cn=m  
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 61 72 6c 68 61   anager,dc=earlha  
  0020:  6d 2c 64 63 3d 65 64 75  80 0c 73 75 70 65 72 73   m,dc=edu..supers  
  0030:  65 63 52 45 54 0a                                  ecret.            
ldap_write: want=54, written=54
  0000:  30 34 02 01 01 60 2f 02  01 03 04 1c 63 6e 3d 6d   04...`/.....cn=m  
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 61 72 6c 68 61   anager,dc=earlha  
  0020:  6d 2c 64 63 3d 65 64 75  80 0c 73 75 70 65 72 73   m,dc=edu..supers  
  0030:  65 63 52 45 54 0a                                  ecret.            
ldap_result ld 0x80103e040 msgid 1
wait4msg ld 0x80103e040 msgid 1 (infinite timeout)
wait4msg continue ld 0x80103e040 msgid 1 all 1
** ld 0x80103e040 Connections:
* host: xaga  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Fri Jan 27 15:48:31 2012


** ld 0x80103e040 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x80103e040 request count 1 (abandoned 0)
** ld 0x80103e040 Response Queue:
   Empty
  ld 0x80103e040 response count 0
ldap_chkResponseList ld 0x80103e040 msgid 1 all 1
ldap_chkResponseList returns ld 0x80103e040 NULL
ldap_int_select
read1msg: ld 0x80103e040 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=0x8010400b0 ptr=0x8010400b0 end=0x8010400bc len=12
  0000:  02 01 01 61 07 0a 01 00  04 00 04 00               ...a........      
read1msg: ld 0x80103e040 msgid 1 message type bind
ber_scanf fmt ({eAA) ber:
ber_dump: buf=0x8010400b0 ptr=0x8010400b3 end=0x8010400bc len=9
  0000:  61 07 0a 01 00 04 00 04  00                        a........         
read1msg: ld 0x80103e040 0 new referrals
read1msg:  mark request completed, ld 0x80103e040 msgid 1
request done: ld 0x80103e040 msgid 1
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_parse_result
ber_scanf fmt ({iAA) ber:
ber_dump: buf=0x8010400b0 ptr=0x8010400b3 end=0x8010400bc len=9
  0000:  61 07 0a 01 00 04 00 04  00                        a........         
ber_scanf fmt (}) ber:
ber_dump: buf=0x8010400b0 ptr=0x8010400bc end=0x8010400bc len=0

ldap_msgfree
filter: (objectclass=*)
requesting: All userApplication attributes
# extended LDIF
#
...
ldapsearch -v -d -1 -x -w 'supersecret' -D cn=manager,dc=earlham,dc=edu -b ou=People,dc=earlham,dc=edu -h xaga
ldap_initialize( ldap://xaga )
ldap_create
ldap_url_parse_ext(ldap://xaga)
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP xaga:389
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 159.28.1.98:389
ldap_pvt_connect: fd: 3 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
ber_scanf fmt ({it) ber:
ber_dump: buf=0x801040000 ptr=0x801040000 end=0x801040035 len=53
  0000:  30 33 02 01 01 60 2e 02  01 03 04 1c 63 6e 3d 6d   03...`......cn=m  
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 61 72 6c 68 61   anager,dc=earlha  
  0020:  6d 2c 64 63 3d 65 64 75  80 0b 73 75 70 65 72 73   m,dc=edu..supers  
  0030:  65 63 52 45 54                                     ecret             
ber_scanf fmt ({i) ber:
ber_dump: buf=0x801040000 ptr=0x801040005 end=0x801040035 len=48
  0000:  60 2e 02 01 03 04 1c 63  6e 3d 6d 61 6e 61 67 65   `......cn=manage  
  0010:  72 2c 64 63 3d 65 61 72  6c 68 61 6d 2c 64 63 3d   r,dc=earlham,dc=  
  0020:  65 64 75 80 0b 73 75 70  65 72 73 65 63 52 45 54   edu..supersecret  
ber_flush2: 53 bytes to sd 3
  0000:  30 33 02 01 01 60 2e 02  01 03 04 1c 63 6e 3d 6d   03...`......cn=m  
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 61 72 6c 68 61   anager,dc=earlha  
  0020:  6d 2c 64 63 3d 65 64 75  80 0b 73 75 70 65 72 73   m,dc=edu..supers  
  0030:  65 63 52 45 54                                     ecret             
ldap_write: want=53, written=53
  0000:  30 33 02 01 01 60 2e 02  01 03 04 1c 63 6e 3d 6d   03...`......cn=m  
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 61 72 6c 68 61   anager,dc=earlha  
  0020:  6d 2c 64 63 3d 65 64 75  80 0b 73 75 70 65 72 73   m,dc=edu..supers  
  0030:  65 63 52 45 54                                     ecret             
ldap_result ld 0x80103f040 msgid 1
wait4msg ld 0x80103f040 msgid 1 (infinite timeout)
wait4msg continue ld 0x80103f040 msgid 1 all 1
** ld 0x80103f040 Connections:
* host: xaga  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Fri Jan 27 15:48:48 2012


** ld 0x80103f040 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x80103f040 request count 1 (abandoned 0)
** ld 0x80103f040 Response Queue:
   Empty
  ld 0x80103f040 response count 0
ldap_chkResponseList ld 0x80103f040 msgid 1 all 1
ldap_chkResponseList returns ld 0x80103f040 NULL
ldap_int_select
read1msg: ld 0x80103f040 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 31 04 00 04 00                                  .1....            
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x8010050c0 ptr=0x8010050c0 end=0x8010050cc len=12
  0000:  02 01 01 61 07 0a 01 31  04 00 04 00               ...a...1....      
read1msg: ld 0x80103f040 msgid 1 message type bind
ber_scanf fmt ({eAA) ber:
ber_dump: buf=0x8010050c0 ptr=0x8010050c3 end=0x8010050cc len=9
  0000:  61 07 0a 01 31 04 00 04  00                        a...1....         
read1msg: ld 0x80103f040 0 new referrals
read1msg:  mark request completed, ld 0x80103f040 msgid 1
request done: ld 0x80103f040 msgid 1
res_errno: 49, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_parse_result
ber_scanf fmt ({iAA) ber:
ber_dump: buf=0x8010050c0 ptr=0x8010050c3 end=0x8010050cc len=9
  0000:  61 07 0a 01 31 04 00 04  00                        a...1....         
ber_scanf fmt (}) ber:
ber_dump: buf=0x8010050c0 ptr=0x8010050cc end=0x8010050cc len=0

ldap_msgfree
ldap_err2string
ldap_bind: Invalid credentials (49)