[Date Prev][Date Next]
Re: (ITS#7242) new -y (Read password from file) does not work
> 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) (188.8.131.52)
> I really like the new -y option to read the password from a file but it
> work. Also it broke the old behavior which read it from standard input if
> used -W.
> I have a one line password file. I used to use this successfully with a
> $ ldapsearch -x -H $TIM -s sub -b "dc=myorg, dc=org" "(uid=someuid)" uid
> cn <
> Now this command just prompts me for the password.
> And when I try -y, it seems that an 0x0a character is added to the
> string (I found this by using tcpdump to capture the packets), so that
> 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.