From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Add new key from a variable
Date: Fri, 26 Dec 2014 17:51:59 +0100 [thread overview]
Message-ID: <20141226165159.GA1324@tansi.org> (raw)
In-Reply-To: <30b08ec03a73cc2f8b841a6d77ba2a94.squirrel@ssl.verfeiert.org>
This may not be such a good idea. If you are unlucky, the
variable content may end up in swap. My guess would be that
the probability is low though.
Arno
On Fri, Dec 26, 2014 at 07:49:40 CET, Sven Eschenberg wrote:
> Hi,
>
> You could use STDIN to pipe the value of $var into cryptsetup, if that
> fits your needs. See man page on password processing to make sure you
> don't hit any surprises.
>
> Regards
>
> -Sven
>
>
> On Fri, December 26, 2014 03:47, Jian-Ming Zheng wrote:
> > Hi,
> >
> > I want to write a script to add a new key to LUKS device /dev/sda2. As
> > I know, I can set the new key in a key file (for example,
> > new-key-file) and use the key file in the option. For example,
> >
> > $ cryptsetup luksAddKey /dev/sda2 new-key-file
> >
> > Can I add a new key from a variable defined in my script (for example,
> > $newkey) instead of using a key file?
> >
> > Thanks
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
> >
>
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
next prev parent reply other threads:[~2014-12-26 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-26 2:47 [dm-crypt] Add new key from a variable Jian-Ming Zheng
2014-12-26 6:49 ` Sven Eschenberg
2014-12-26 16:51 ` Arno Wagner [this message]
2014-12-26 17:09 ` Sven Eschenberg
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=20141226165159.GA1324@tansi.org \
--to=arno@wagner.name \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.