1. Generate a key, for example:
dd if=/dev/urandom of=/root/key bs=4k count=1
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 -----
From: "octane indice" <octane@xxxxxxxxxx>
To: <dm-crypt@xxxxxxxx>
Sent: Sunday, June 13, 2010 6:07 PM
Subject: 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 <device> [<new key file>]
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é avec Inmano, ma messagerie renversante et gratuite :
http://www.inmano.com
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt