From: Frederick Gotham <thomas123@gmx.ca>
To: dm-crypt@saout.de
Subject: [dm-crypt] luksAddKey one liner
Date: Fri, 11 Sep 2020 00:30:34 +0200 [thread overview]
Message-ID: <trinity-237414ab-7521-493a-a8ef-6baeebc796e6-1599777034940@3c-app-mailcom-bs03> (raw)
Let's say you create a new volume as follows:
echo -n pass0 | cryptsetup luksFormat /dev/sda2 -
So the password in keyslot #0 is "pass0".
Next, you want to set the password in keyslot #1 to "pass1", well I figured out how to do it with a one-liner:
echo -n "pass0pass1" | cryptsetup luksAddKey --key-file /dev/stdin --keyfile-size 5 --key-slot 1 /dev/sda2 /dev/stdin
Frederick
reply other threads:[~2020-09-10 22:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=trinity-237414ab-7521-493a-a8ef-6baeebc796e6-1599777034940@3c-app-mailcom-bs03 \
--to=thomas123@gmx.ca \
--cc=dm-crypt@saout.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).