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
Forum Moderator
Posts: 27417
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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. 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

Return to “CentOS 7 - Security Support”