Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed Ubuntu 12 with full disk encryption, and now I want to change the pass phrase.

How can this be done?

share|improve this question
    
What have you tried already? –  Ƭᴇcʜιᴇ007 Jun 2 '12 at 15:24
    
Which software are you using? –  Dennis Jun 2 '12 at 15:35
    
@Dennis Ubuntu 12, the option I chose was 'encrypted LVM'. I think I heard it uses luks. –  HappyDeveloper Jun 2 '12 at 15:48
    
@techie007 I can't just try right now, can't afford the risk (no time for a reinstall). So I want to know the right way to do this. –  HappyDeveloper Jun 2 '12 at 15:52

3 Answers 3

up vote 5 down vote accepted

This is the easiest way to do it:

  1. Press Super.

  2. Type Disk Utility and launch the program with the same name.

  3. Select the encrypted partition.

  4. Click Change passphrase.

share|improve this answer

Ubuntu uses LUKS to encrypt partitions and LVMs.

LUKS supports eight key slots per partition. The cryptsetup luksAddKey and cryptsetup luksRemoveKey can be used to add and remove keys from the slots. cryptsetup luksDump can tell you which slots have keys in them.

Basically the right way to do this is you want to add a key to a new slot, test that you can successfully use the new key, and then when you are ready, delete the old key.

During the boot process, when you are asked for the key, it should tell which block device it's trying to unlock. That's the partition you need to apply the cryptsetup commands to.

So use cryptsetup to add a key, reboot, and try the new key. Once you can confirm that works, you can delete the old key.

I would back up your data before trying this or taking anyone else's advice, or at least wait for a couple upvotes. It's been a while since I changed a key on a LUKS partition. (edit: or used a Linux system with GUI...)

share|improve this answer
    
I would like to add that creating an image of the whole disk is not necessary just for modifying the passphrase. Simply use something like cryptsetup luksHeaderBackup /dev/sda1 --header-backup-file /media/externalthing/somefile to backup the file. Replace luksHeaderBackup by luksHeaderRestore to restore the old keys again. Note that the header backup should be saved to a secure place (preferably another LUKS partition on a USB stick). –  Lekensteyn Jun 2 '12 at 16:53

Here is what to do

  • Go to Dash Home
  • Search for Disks and click it
  • Select your hard disk on the left

Now look to the right. There are likely to be several partitions.

  • Select one of them.
  • Look for the tiny logo of two gears
  • Click on the gears

The option to change passphrase will be available if its the right partition.
If its not there, select another partition. Most likely, the correct partition will be Partition 5

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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