DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Marek Stopka <mstopka@opensuse.org>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] LUKS password forgoten, any way how to change it?
Date: Sat, 06 Mar 2010 19:57:51 +0100	[thread overview]
Message-ID: <4B92A5AF.4040601@redhat.com> (raw)
In-Reply-To: <ab6ee74d1003051612j3468bf10n97fa92251a07fab6@mail.gmail.com>

On 03/06/2010 01:12 AM, Marek Stopka wrote:
> Hi guys, I have forgotten password to my luks encrypted disk, I have
> lost no data (yet :) ), because system is still running with unlocked
> device, but problem is, that I have a scheduled hardware maintanance
> window quite soon, so I was wondering is it somehow easily possible to
> luksAddKey without knowing a password or recover password from memory
> or it will be much more easier to copy those data somewhere else and
> create a new encrypted disk? It is like 12TB of data so I would really
> prefer not to copy those data somewhere else, but if I will have to, I
> can pull that off...
> 
> But I am wondering since key need to be in a memory somewhere there
> could be a way... :)

If the encrypted device is active and you are root...

dmsetup table --showkeys

recode master key from the table (from hexa) into binary and store to file

cryptsetup luksAddKey --master-key-file <file above>

(with cryptsetup 1.1.0)

Milan

  parent reply	other threads:[~2010-03-06 18:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-06  0:12 [dm-crypt] LUKS password forgoten, any way how to change it? Marek Stopka
2010-03-06 12:16 ` Gilles PIETRI
2010-03-06 15:39   ` Marek Stopka
2010-03-06 17:52     ` Bryan Kadzban
2010-03-06 14:58 ` Heinz Diehl
2010-03-06 18:57 ` Milan Broz [this message]
2010-03-06 20:18   ` Heinz Diehl
2010-03-06 20:41     ` Milan Broz
2010-03-06 21:04       ` Arno Wagner
2010-03-06 21:01     ` Arno Wagner
2010-03-06 22:07       ` Heinz Diehl

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=4B92A5AF.4040601@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    --cc=mstopka@opensuse.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