Return-Path: Received: from dd5402.kasserver.com (dd5402.kasserver.com [85.13.130.101]) by mail.saout.de (Postfix) with ESMTP for ; Sun, 13 Jun 2010 22:44:26 +0200 (CEST) Message-ID: <3175DFB2B4BC4816B34F55307E41C758@AliPC> From: "Ali Reza Sajedi" References: <1276445230.4c15022eeba28@www.inmano.com> In-Reply-To: <1276445230.4c15022eeba28@www.inmano.com> Date: Sun, 13 Jun 2010 22:44:24 +0200 MIME-Version: 1.0 Content-Type: text/plain; format="flowed"; charset="iso-8859-1"; reply-type="original" Content-Transfer-Encoding: quoted-printable Subject: Re: [dm-crypt] luksAddKey with a keyfile? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de, octane indice 1. Generate a key, for example: dd if=3D/dev/urandom of=3D/root/key bs=3D4k count=3D1 2. Add the key: cryptsetup luksAddKey /dev/sda1 /root/key 3. Open the device: cryptsetup luksOpen /dev/sda1 sda1_crypt --key-file /root/key ----- Original Message -----=20 From: "octane indice" To: Sent: Sunday, June 13, 2010 6:07 PM Subject: [dm-crypt] luksAddKey with a keyfile? Hello I want to use a key-file instead a password for an existing lukspartition. How can I do it (??) root@dark:~# cryptsetup --version cryptsetup 1.1.0 For password, I do a: cryptsetup luksAddKey /dev/sda1 and it asks for the old password, then the new passwod: root@dark:~# cryptsetup luksAddKey /dev/loop0 Enter any passphrase: Key slot 0 unlocked. Enter new passphrase for key slot: Verify passphrase: root@dark:~# But how use it with a file? man says to use luksAddKey [] And here is the result: root@dark:~# cryptsetup luksAddKey /dev/loop0 /root/key Enter any passphrase: Verify passphrase: Key slot 0 unlocked. root@dark:~# cryptsetup luksClose /dev/loop0 Device /dev/loop0 not found root@dark:~# cryptsetup luksClose cipher root@dark:~# cat key | cryptsetup luksOpen /dev/loop0 cipher No key available with this passphrase. No key available with this passphrase. No key available with this passphrase. root@dark:~ What am I doing wrong? I prefer to use "cat key" for a later use. Why I have three error messages? Thanks for help Envoy=E9 avec Inmano, ma messagerie renversante et gratuite :=20 http://www.inmano.com _______________________________________________ dm-crypt mailing list dm-crypt@saout.de http://www.saout.de/mailman/listinfo/dm-crypt=20