From: Daniel Troeder <daniel@admin-box.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure.
Date: Wed, 05 May 2010 10:00:43 +0200 [thread overview]
Message-ID: <4BE125AB.1030105@admin-box.com> (raw)
In-Reply-To: <4BE0F71D.7080907@xunil.at>
[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]
On 05/05/2010 06:42 AM, Stefan G. Weichinger wrote:
> Am 04.05.2010 23:24, schrieb Daniel Troeder:
>
>> I'm using sys-fs/cryptsetup-1.1.1_rc1 since 02.05.2010 and didn't have
>> any issues.
>> Please decrypt your partition from the command line, so we can see if it
>> is a cryptsetup/luks/kernel problem or a pam_mount problem.
>>
>> Cmdline should something like:
>> $ sudo cryptsetup -d /etc/security/verysekrit.key luksOpen
>> /dev/mapper/VG01-crypthome myhome
>> Which should create /dev/mapper/myhome.
>
> My user sgw is currently not allowed to sudo this (should it be? it
> never was).
>
> And for root it says "Kein Schlüssel mit diesem Passsatz verfügbar."
> (german) which should be "No key available with this passphrase." in
> english.
That is a message from cryptsetup. As you are using openssl to get the
key, I think the problem might be there.
I followed the guide you linked here (website is down, but google-cache
works:
http://webcache.googleusercontent.com/search?q=cache:7eaSac72CoIJ:home.coming.dk/index.php/2009/05/20/encrypted_home_partition_using_luks_pam_+encrypted_home_partition_using_luks_pam&cd=2&hl=de&ct=clnk&gl=de&client=firefox-a)
and it works for me (kernel is 2.6.33-zen2):
lvcreate -n crypttest -L 100M vg0
KEY=`tr -cd [:graph:] < /dev/urandom | head -c 79`
echo $KEY | openssl aes-256-ecb > verysekrit.key
openssl aes-256-ecb -d -in verysekrit.key
# (aha :)
openssl aes-256-ecb -d -in verysekrit.key | cryptsetup -v --cipher
aes-cbc-plain --key-size 256 luksFormat /dev/vg0/crypttest
openssl aes-256-ecb -d -in verysekrit.key | cryptsetup luksOpen
/dev/vg0/crypttest decryptedtest
cryptsetup luksClose crypttest
# (i couldn't close it... don't know why...)
The key that cryptsetup is given to decrypt the partition is created by
openssl from the file. Please check the output of
$ openssl aes-256-ecb -d -in verysekrit.key
under both kernel - it should be identical.
BTW: You'll get your error message if you run:
$ echo notmykey | cryptsetup luksOpen /dev/vg0/crypttest decryptedtes
Bye,
Daniel
--
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2010-05-05 8:01 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 16:56 [gentoo-user] Kernel upgrade and now LUKS failure Jason Dusek
2010-05-03 17:31 ` Florian Philipp
2010-05-04 10:06 ` Stefan G. Weichinger
2010-05-04 16:54 ` [gentoo-user] " walt
2010-05-04 17:38 ` Stefan G. Weichinger
2010-05-04 19:28 ` Stefan G. Weichinger
2010-05-04 21:24 ` Daniel Troeder
2010-05-05 4:42 ` Stefan G. Weichinger
2010-05-05 8:00 ` Daniel Troeder [this message]
2010-05-05 8:42 ` Stefan G. Weichinger
2010-05-05 19:39 ` Daniel Troeder
2010-05-05 20:17 ` Stefan G. Weichinger
2010-05-05 20:23 ` Stefan G. Weichinger
2010-05-06 16:24 ` Daniel Troeder
2010-05-06 18:38 ` Stefan G. Weichinger
2010-05-07 8:53 ` Stefan G. Weichinger
2010-05-07 14:24 ` Stefan G. Weichinger
2010-05-07 21:14 ` Stefan G. Weichinger
2010-05-10 16:48 ` Daniel Troeder
2010-05-04 23:51 ` walt
-- strict thread matches above, loose matches on Subject: below --
2010-05-16 12:36 Jan Engelhardt
2010-05-17 9:14 ` Stefan G. Weichinger
2010-05-17 21:01 ` Daniel Troeder
2010-05-18 13:05 ` Jan Engelhardt
2010-05-18 13:44 ` Stefan G. Weichinger
2010-05-18 16:04 ` Jan Engelhardt
2010-05-18 16:56 ` Stefan G. Weichinger
2010-05-18 17:57 ` Jan Engelhardt
2010-05-18 18:57 ` Stefan G. Weichinger
2010-05-18 19:33 ` Stefan G. Weichinger
2010-05-18 20:06 ` Jan Engelhardt
2010-05-18 20:17 ` Stefan G. Weichinger
2010-05-18 21:16 ` Jan Engelhardt
2010-05-18 21:49 ` Stefan G. Weichinger
2010-05-18 22:23 ` Jan Engelhardt
2010-05-20 10:25 ` Stefan G. Weichinger
2010-05-20 13:40 ` Stefan G. Weichinger
2010-05-18 19:38 ` Eray Aslan
2010-05-21 20:24 ` Daniel Troeder
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=4BE125AB.1030105@admin-box.com \
--to=daniel@admin-box.com \
--cc=gentoo-user@lists.gentoo.org \
/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