LX0-104 · Question #355
An administrator has created a mapping with the following command: cryptsetup luksOpen /dev/sda1 cryptvol and has set three different keys. Which command below will delete the first key?
The correct answer is A. cryptsetup luksDelKey /dev/sda1 0. To delete the first key from a LUKS encrypted volume, the cryptsetup luksDelKey command is used, specifying the underlying device and the zero-indexed key slot number.
Question
Options
- Acryptsetup luksDelKey /dev/sda1 0
- Bcryptsetup luksDelKey /dev/sda1 1
- Ccryptsetup luksDelKey /dev/mapper/cryptvol 1
- Dcryptsetup luksDelKey /dev/mapper/cryptvol 0
How the community answered
(20 responses)- A90% (18)
- B5% (1)
- C5% (1)
Why each option
To delete the first key from a LUKS encrypted volume, the `cryptsetup luksDelKey` command is used, specifying the underlying device and the zero-indexed key slot number.
The `cryptsetup luksDelKey` command deletes a key from a LUKS volume, requires the underlying device (`/dev/sda1`) where the LUKS header resides, and uses a zero-indexed slot number (0 for the first key).
While the device is correct, using index `1` would delete the second key slot, not the first.
The `/dev/mapper/cryptvol` refers to the decrypted mapped device, not the underlying LUKS-encrypted device where key slots are managed.
The `/dev/mapper/cryptvol` refers to the decrypted mapped device, not the underlying LUKS-encrypted device where key slots are managed.
Concept tested: LUKS key deletion
Source: https://man7.org/linux/man-pages/man8/cryptsetup.8.html
Topics
Community Discussion
No community discussion yet for this question.