From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from v6.tansi.org (ns.km31936-01.keymachine.de [87.118.116.4]) by mail.server123.net (Postfix) with ESMTP for ; Fri, 26 Dec 2014 17:52:01 +0100 (CET) Received: from gatewagner.dyndns.org (77-57-49-177.dclient.hispeed.ch [77.57.49.177]) by v6.tansi.org (Postfix) with ESMTPA id 8043F20DC23A for ; Fri, 26 Dec 2014 17:52:00 +0100 (CET) Date: Fri, 26 Dec 2014 17:51:59 +0100 From: Arno Wagner Message-ID: <20141226165159.GA1324@tansi.org> References: <30b08ec03a73cc2f8b841a6d77ba2a94.squirrel@ssl.verfeiert.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30b08ec03a73cc2f8b841a6d77ba2a94.squirrel@ssl.verfeiert.org> Subject: Re: [dm-crypt] Add new key from a variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de 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