Hello,
Maybe it's a silly question, but I'm going crazy and I don't found the solution. I want to use the -y option in a ldapsearch command, so I have write my password in a file (plain text file with the password in plain text), then I run the
ldapsearch -y <mypasswordfile> <other options>
and I get an invalid credential error. I have checked several times that the password is correct. I have debuged the request with wireshark and I have checked that the only difference in the bind request is that -y option is adding a final 0x0a char to the password.
Any idea?
PS: if this could help, I'm using ubuntu 12.04 and I have created the password file with vi (I have also tried creating it with gedit and with echo "..." > <file>)
Le 02/10/2012 08:40, Angel L. Mateo a écrit :
Hello,
Maybe it's a silly question, but I'm going crazy and I don't found
the solution. I want to use the -y option in a ldapsearch command, so I have write my password in a file (plain text file with the password in plain text), then I run the
ldapsearch -y <mypasswordfile> <other options>
and I get an invalid credential error. I have checked several times
that the password is correct. I have debuged the request with wireshark and I have checked that the only difference in the bind request is that -y option is adding a final 0x0a char to the password.
Any idea?
0x0a being the LF character, I suspect you just have to ensure there is none in your file.
PS: if this could help, I'm using ubuntu 12.04 and I have created the password file with vi (I have also tried creating it with gedit and with echo "..." > <file>)
try 'echo -n "..." > <file>" instead.
Angel L. Mateo wrote:
Maybe it's a silly question, but I'm going crazy and I don't found the
solution. I want to use the -y option in a ldapsearch command, so I have write my password in a file (plain text file with the password in plain text), then I run the
ldapsearch -y <mypasswordfile> <other options>
and I get an invalid credential error. I have checked several times that
the password is correct. I have debuged the request with wireshark and I have checked that the only difference in the bind request is that -y option is adding a final 0x0a char to the password.
This is a standard issue when creating the password file with an editor. The solution is to removing the trailing LF.
Ciao, Michael.
openldap-technical@openldap.org