public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Diagon <saout.boxy@xoxy.net>, dm-crypt <dm-crypt@saout.de>
Subject: Re: [dm-crypt] Unattended generation/opening.
Date: Sun, 9 Aug 2020 09:51:58 +0200	[thread overview]
Message-ID: <6da32af3-6bd2-4a84-cf93-0c3d71a66a1f@gmail.com> (raw)
In-Reply-To: <173d0f6cd51.fb4f7ba8559099.2318785520831138201@xoxy.net>


On 09/08/2020 04:05, Diagon wrote:
> Could someone let me know what I'm doing wrong here?  I'm trying to do this in a script, but it doesn't work on the command line, either:
> 
> $ echo "lukssecpwd" | sudo cryptsetup -c twofish-xts-plain64 -s 512 luksFormat /dev/loop5 -

Remove that dash in the end of the line. It will switch to keyfile mode and EOL characted (\r) becomes part of the unlocking passphrase.

Alternatively you can do in format: echo -n "lukssecpwd"  ..

> $ echo "lukssecpwd" | sudo cryptsetup open /dev/loop5 crypt.secret

You will have to use "--key-file -" to do the same trick.

Ream man page section NOTES ON PASSPHRASE PROCESSING FOR LUKS.

Milan

      parent reply	other threads:[~2020-08-09  7:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-09  2:05 [dm-crypt] Unattended generation/opening Diagon
2020-08-09  7:46 ` Michael Kjörling
2020-08-09  7:51 ` Milan Broz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6da32af3-6bd2-4a84-cf93-0c3d71a66a1f@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=saout.boxy@xoxy.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox