I have encrypted my linux partitions. I would know if there's practically a method for overwrite the de-encryption password requested at boot, mounting the hard disk on another pc.

EDIT I'm asking this because I suppose the login password is stored somewhere on the disk itself.

  • 6
    That would kind of defeat the purpose of disk encryption, no...? – Stef Heylen May 18 '18 at 10:46
  • 6
    Marco, if you do not know the password, then does it make sense that you should be able to decrypt a device with a random password? – schroeder May 18 '18 at 10:52
  • Will you use an encryption program with a backdoor password? – mootmoot May 18 '18 at 10:54

Further reading: https://en.wikipedia.org/wiki/Disk_encryption_theory

In summary:

When you encrypt a disk, the data is re-written in an encrypted format. This data is encrypted using a long, secure key. The key is written to the start of the disk. This key is then encrypted using your given password. The password is stored nowhere except your mind.

You CAN reset the password (through some implementations) by re-encrypting the long secure key on the disk using a new password. This requires knowing the old password, to decrypt the key in the first place.

If you don't have the old password, you can't change it, as you don't have any way to decrypt and re-encrypt the long secure key.


Very no. The decryption (not "login") password is not stored on the disk but used as a key to decrypt the data. You could use any other password you wanted, but you would not get your original data back.

If disk encryption passwords were so easy to replace, there would be no point in disk encryption at all.

  • You might want to add that diffusion (in a cryptographic sense) prevents a password similar to the original from producing plaintext similar to the original. – forest May 18 '18 at 23:45


It is possible only if you initially created a rescue disk with the utility you used for the encryption.

  • 3
    Can you explain me why, reading also my edit to the question? – Marco Sulla May 18 '18 at 11:01
  • No password is stored. What can be stored is a key obtained from the password. That is how recovery is possible if you have a recovery disk. – Overmind May 21 '18 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.