On 2010-08-10 07:06, francisco1844 wrote:
> I can’t believe that I did not write down the password to my encrypted
> volume. Had not rebooted in a long time so I had not typed it and now
> that I rebooted I don’t remember what is was.
> Is there any way to automate the trial of different passwords?
> I remember the basic structure of what the password was so if somehow I
> could automate trying passwords from a list I may have a good change to
> recover my volume.
Yes, if you can use another linux and write a script.
Something like this:
cryptsetup luksOpen /dev/whatever cr_test
The response will be something like this:
Enter LUKS passphrase:
key slot 0 unlocked.
If you get the “Command successful” thing, well, you got it. If not (I don’t have the response
handy, test it), then:
cryptsetup remove cr_test
You can also confirm with “cryptsetup status cr_test”.
Now you need a way to not type the password. Have a look at “man cryptsetup”. I think you have to
I’m looking at it again, and I think I’m understanding something I did not previously understand.
You add new passphrases, and have several. I think you can feed a file of several passphrases and
indicate which to use by giving a number with “–key-slot”. Note: I’m not sure of this at all.
So, you have to create an script and test it on a new (small if you want) encrypted filesystem for
testing the procedure. Then create a big file and run the script on the real filesystem.
Read the paragraph “NOTES ON PASSWORD PROCESSING FOR LUKS” in the man, it applies.
And there are several links there you can investigate.
Please post your results, whatever you get. Good luck
> If/when I do remember the password. Is there a way to change the
> password on an encrypted volume? I need to make it something I will
> remember for sure… or write it down somewhere safe…
Yes, you can.
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))