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

Re: (ITS#7242) new -y (Read password from file) does not work



Oh duh. I see now. Thanks!

CP

On Apr 13, 2012, at 13:59, masarati@aero.polimi.it wrote:

>> Full_Name: Chris Paul
>> Version: ldapsearch 2.4.23 (Dec  7 2011 21:37:03)
>> OS: tried both Centos 2.6.32-220.el6.i686 and Cygwin
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (162.119.68.25)
>> 
>> 
>> I really like the new -y option to read the password from a file but it
>> doesn't
>> work. Also it broke the old behavior which read it from standard input if
>> you
>> used -W.
>> 
>> I have a one line password file. I used to use this successfully with a
>> command
>> like:
>> 
>> $ ldapsearch -x -H $TIM -s sub -b "dc=myorg, dc=org" "(uid=someuid)"  uid
>> cn <
>> ~/.ldappw
>> 
>> Now this command just prompts me for the password.
>> 
>> And when I try -y, it seems that an 0x0a character is added to the
>> password
>> string (I found this by using tcpdump to capture the packets), so that
>> fails
>> with "Invalid credentials (49)".
> 
> This is a common user error.  The "0x0a" is a newline ('\n') which is
> probably present in your file.  You need to create a file that contains
> exactly the password.  For example, to create a file that contains the
> password "secret" you need to do
> 
> echo -n "secret" > filename.
> 
> This ITS will be closed.
> 
> p.
>