<div dir="ltr"><div dir="ltr">Hi Teddy, the problem is the \n character at the end of file.<div><br></div><div><div>juanmi@juanmi:~$ od -t c /tmp/p.txt</div><div>0000000   p   e   p   e  \n</div><div>0000005</div><div><br></div><div>I solve the automatism with expect.<br></div><div><br></div><div>Thanks other time ;-)</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El sáb., 4 may. 2019 a las 16:17, Teddy Hogeborn (<<a href="mailto:teddy@recompile.se" target="_blank">teddy@recompile.se</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Juan Miguel Alcarria Herrera <<a href="mailto:juanmi@arco2000.es" target="_blank">juanmi@arco2000.es</a>> writes:<br>
<br>
> I write you because I think that I found a bug when I use the passfile<br>
> with mandos-keygen.<br>
><br>
> If I use this command:<br>
><br>
> mandos-keygen --passfile /tmp/p.txt --type RSA --force<br>
><br>
> The system don't start with the content of /tmp/p.txt (only have the<br>
> word pepe without /n or some enter)<br>
><br>
> If I use this command to check the password:<br>
><br>
> /usr/lib/arm-linux-gnueabihf/mandos/plugins.d/mandos-client<br>
> --pubkey=/etc/keys/mandos/pubkey.txt<br>
> --seckey=/etc/keys/mandos/seckey.txt --connect=<a href="http://111.111.111.111:8888" rel="noreferrer" target="_blank">111.111.111.111:8888</a><br>
><br>
> (Without the final echo) The result have a Enter:<br>
><br>
> root@openfone:~#<br>
> /usr/lib/arm-linux-gnueabihf/mandos/plugins.d/mandos-client<br>
> --pubkey=/etc/keys/mandos/pubkey.txt<br>
> --seckey=/etc/keys/mandos/seckey.txt --connect=<a href="http://111.111.111.111:8888" rel="noreferrer" target="_blank">111.111.111.111:8888</a><br>
> pepe<br>
> root@openfone:~#<br>
><br>
> If i use<br>
><br>
> mandos-keygen --password --type RSA --force<br>
><br>
> and input pepe the result of the check command is this:<br>
><br>
> root@openfone:~#<br>
> /usr/lib/arm-linux-gnueabihf/mandos/plugins.d/mandos-client<br>
> --pubkey=/etc/keys/mandos/pubkey.txt<br>
> --seckey=/etc/keys/mandos/seckey.txt --connect=<a href="http://111.111.111.111:8888" rel="noreferrer" target="_blank">111.111.111.111:8888</a><br>
> peperoot@openfone:~#<br>
><br>
> and works fine. You can watch that in the second command don't have a<br>
> Enter beetwen pepe and root<br>
<br>
I cannot reproduce this.  When I try, mandos-client correctly outputs<br>
the password without a newline character.<br>
<br>
What version of Mandos are you using?<br>
<br>
If you run mandos-client with the --debug flag, mandos-client should<br>
(among a lot of other debugging output ) print "Mandos plugin<br>
mandos-client: Decrypted password is:" and the password in hexadecimal<br>
bytes.  Is the last byte a newline character (0A) for you?<br>
<br>
Does your file /tmp/p.txt truly have no newline character in it?  That<br>
is, if you run the command "od -t c /tmp/p.txt", does the output look<br>
like this:<br>
<br>
$ od -t c /tmp/p.txt<br>
0000000   p   e   p   e<br>
0000004<br>
$<br>
<br>
/Teddy Hogeborn<br>
<br>
-- <br>
The Mandos Project<br>
<a href="https://www.recompile.se/mandos" rel="noreferrer" target="_blank">https://www.recompile.se/mandos</a><br>
_______________________________________________<br>
Mandos-Dev mailing list<br>
<a href="mailto:Mandos-Dev@recompile.se" target="_blank">Mandos-Dev@recompile.se</a><br>
<a href="https://mail.recompile.se/cgi-bin/mailman/listinfo/mandos-dev" rel="noreferrer" target="_blank">https://mail.recompile.se/cgi-bin/mailman/listinfo/mandos-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-7967260204009364785gmail_signature"><div dir="ltr"><div><div><span style="color:rgb(0,0,0)"><strong>Juan Miguel Alcarria Herrera</strong></span></div><div><div><span style="color:rgb(52,73,94)">Departamento Informática y Telecomunicaciones.</span></div><div><span style="color:rgb(52,73,94)">+34 949 348 480</span></div><div><div> </div><div><img src="https://drive.google.com/a/improvisa.com/uc?id=1E3RaJw_n2TwogKzzDY0Gd-C-uW2pa1v0&export=download"></div></div></div></div><div> </div><div><div style="text-align:justify"><span style="color:rgb(126,140,141)"><span style="font-size:8pt">NOTA LEGAL: De conformidad con lo establecido en las normativas vigentes de Protección de Datos a nivel nacional y europeo, ARCO 2000 TERRENOS Y EDIFICACIONES garantiza la adopción de las medidas técnicas y organizativas necesarias para asegurar el tratamiento confidencial de los datos de carácter personal. Asimismo le informamos que </span><span style="font-size:8pt">su dirección de email ha sido recabada del propio interesado o de fu entes de acceso público, y está incluida en nuestros ficheros con la finalidad de mantener contacto con usted para el envío de comunicaciones sobre nuestros servicios mientras exista un interés mutuo para ello o una relación negocia! o contractual. Usted puede ejercer sus derechos de acceso, rectificación y supresión de sus datos, así como los derechos de limitación y oposición, dirigiendo su petición a la dirección postal C/ Josefa Valcarcel 8, 28027,Madrid, o al correo electrónico <a href="mailto:rgpd@arco2000.es" style="color:rgb(17,85,204)" target="_blank">rgpd@arco2000.es</a>.</span></span></div><div style="text-align:justify"> </div><div style="text-align:justify"><span style="font-size:8pt;color:rgb(126,140,141)">Si considera que el tratamiento no se ajusta a la normativa vigente de Protección de Datos, podrá presentar una reclamación ante la autoridad de control correspondiente. </span></div><div style="text-align:justify"> </div><div style="text-align:justify"><span style="font-size:8pt;color:rgb(126,140,141)">Puede ponerse en contacto con nosotros si precisa más información al respecto.</span></div></div></div></div>