Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am stuck with a big problem.

I have encrypted my linux drive with LUKS and now I can't remember it. During boot, it prompts me for the passphrase, but I went into troubleshooting mode and deleted the entry from /etc/crypttab so at least I can boot now into my account but that doesn't solve the problem. I can't access my drive /dev/sda5.

Can someone please show me a way to crack the passphrase or is there no way around it.

share|improve this question

migrated from Sep 19 '12 at 9:21

This question came from our site for professional and enthusiast programmers.

how long is the passphrase roughly ? If its short, you may be able to brute force it, but other than that, you're hosed. – Sirex Sep 19 '12 at 22:14
@Sirex: LUKS uses a key derivation function, making brute force much more difficult. It would have to be a very short passphrase. – Dietrich Epp Sep 19 '12 at 23:03
useful to know, thanks. – Sirex Sep 19 '12 at 23:48
It's your LUKSy day. Encryption works, the bad guys can't access your data. And if you aren't careful with passphrase management, neither can you. It's working as designed. – Fiasco Labs Apr 21 '13 at 17:05
up vote 9 down vote accepted

There is no way around it. That the whole point of encryption in the first place.

You will have to erase the partition and start over, all data is lost.

share|improve this answer
Thanx can i get a second opinion anyone?? :-/ !! – Ansh David Sep 19 '12 at 10:32
@AnshDavid: I don't think you really understand the whole "encryption" concept. Encryption is specifically designed to prevent you from accessing the data without the passphrase, that is the one and only purpose of encryption. – Dietrich Epp Sep 19 '12 at 10:52
@AnshDavid: Okay, here's the second opinion. If you encrypt something with a passphrase, you do it to make sure that no one with no means has access to that data unless you give them the passphrase. That "no means" part is quite literally...if you forget your passphrase, you have a problem. That you can't recover the data or the passphrase (but for remembering or guessing) shows that the encryption is working as it should and was designed to. – Bobby Sep 19 '12 at 12:44
thankx @Dierich – Ansh David Sep 19 '12 at 19:37
...thanx @Bobby – Ansh David Sep 19 '12 at 19:38

Unless you chose to make a backup of the encryption key during the installation (if installed using the alternate installer of Ubuntu for example), then you're the only capable of decrypting the key on the disk to unlock the volume.

No way to recover from the volume. Recover from backups.

As @DietrichEpp mentioned: this is the whole point encryption in the first place. Nobody should be able to read your data unless the correct key/passphrase is provided, including yourself.

share|improve this answer
+1 for "Recover from backups." If you don't have backups, you're doing it wrong. – Michael Hampton Apr 21 '13 at 17:42

I have created a Windows program that will perform a dictionary attack on Luks volumes. Its slow by design!

share|improve this answer

If you used to remember the password and have forgotten it, chances are you remember some information about it (length, some symbols used, some symbols not used, etc), that could make it feasible to brute-force. Even with the astonishingly slow speed of 1.3 seconds per attempt that I get using the naive and slow method of calling 'cryptsetup luksOpen' repeatedly.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .