mandos passfile

Teddy Hogeborn teddy at recompile.se
Sat May 4 16:17:17 CEST 2019


Juan Miguel Alcarria Herrera <juanmi at arco2000.es> writes:

> I write you because I think that I found a bug when I use the passfile
> with mandos-keygen.
>
> If I use this command:
>
> mandos-keygen --passfile /tmp/p.txt --type RSA --force
>
> The system don't start with the content of /tmp/p.txt (only have the
> word pepe without /n or some enter)
>
> If I use this command to check the password:
>
> /usr/lib/arm-linux-gnueabihf/mandos/plugins.d/mandos-client
> --pubkey=/etc/keys/mandos/pubkey.txt
> --seckey=/etc/keys/mandos/seckey.txt --connect=111.111.111.111:8888
>
> (Without the final echo) The result have a Enter:
>
> root at openfone:~#
> /usr/lib/arm-linux-gnueabihf/mandos/plugins.d/mandos-client
> --pubkey=/etc/keys/mandos/pubkey.txt
> --seckey=/etc/keys/mandos/seckey.txt --connect=111.111.111.111:8888
> pepe
> root at openfone:~#
>
> If i use
>
> mandos-keygen --password --type RSA --force
>
> and input pepe the result of the check command is this:
>
> root at openfone:~#
> /usr/lib/arm-linux-gnueabihf/mandos/plugins.d/mandos-client
> --pubkey=/etc/keys/mandos/pubkey.txt
> --seckey=/etc/keys/mandos/seckey.txt --connect=111.111.111.111:8888
> peperoot at openfone:~#
>
> and works fine. You can watch that in the second command don't have a
> Enter beetwen pepe and root

I cannot reproduce this.  When I try, mandos-client correctly outputs
the password without a newline character.

What version of Mandos are you using?

If you run mandos-client with the --debug flag, mandos-client should
(among a lot of other debugging output ) print "Mandos plugin
mandos-client: Decrypted password is:" and the password in hexadecimal
bytes.  Is the last byte a newline character (0A) for you?

Does your file /tmp/p.txt truly have no newline character in it?  That
is, if you run the command "od -t c /tmp/p.txt", does the output look
like this:

$ od -t c /tmp/p.txt
0000000   p   e   p   e
0000004
$

/Teddy Hogeborn

-- 
The Mandos Project
https://www.recompile.se/mandos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://mail.recompile.se/pipermail/mandos-dev/attachments/20190504/2f4f18ed/attachment.sig>


More information about the Mandos-Dev mailing list