Add second LUKS password

Support for security such as Firewalls and securing linux
Post Reply
mccarthyjd
Posts: 3
Joined: 2015/01/15 18:01:59

Add second LUKS password

Post by mccarthyjd » 2015/01/15 18:05:30

When I installed my centos 7 I chose to encrypt the disk and my luks password is accepted when it reboots. I wish to add a second luks password but apparently I did somthing wrong since when I enter the below I get an error.

cryptsetup luksAddKey /dev/sda1 the response is /dev/sda1 is not a valid LUKS device.

This is per the site http://wiki.centos.org/HowTos/EncryptedFilesystem. Granted the site specifies encrypting volumes not drives. When I specify the volume it prompts me to enter an existing LUKS password and allows me to enter an additional password but when it reboots, only the orginal password is accepted no new passwords.

The fstab says it's encrypted and again I'm prompted to enter a LUKS password before the OS loads. Is there any easy command to type that will add a second password?

A million thanks,
Johnny Mac

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Add second LUKS password

Post by TrevorH » 2015/01/15 18:58:01

Are you sure that /dev/sda1 is your encrypted filesystem? In a normal setup using the automated installer, it's very likely that /dev/sda1 is /boot. Perhaps you should look at the output from cryptsetup status whatever where "whatever" is the last portion in the output of df -m e.g. in

Code: Select all

/dev/mapper/encrypted      907010  180216    717578  21% /
(so in my example, it's "encrypted"). The output from cryptsetup should have a device: line and that's what you need to add the key to.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

mccarthyjd
Posts: 3
Joined: 2015/01/15 18:01:59

Re: Add second LUKS password

Post by mccarthyjd » 2015/01/15 19:16:56

TrevorH,

You are amazing. It was /sda3 (as you stated /sda1 was the boot). A million thanks :D

Johnny Mac

Post Reply