LUKS Error unlocking Operation not permitted

General support questions
Post Reply
akiro
Posts: 5
Joined: 2021/03/13 16:13:01

LUKS Error unlocking Operation not permitted

Post by akiro » 2022/08/07 22:15:36

Hi all,
a quite complex question about error on mounting the partition encrypted.

I use CentOS 7.9 and yesterday after a normal use of my pc (login, inserted the 3 passwords to unlock the encrypted partition, surfing the web,...) I powered off my pc but after some hours when I logged in again I was not able to unlock again it.
The error when I try to mount it on /mnt/documenti via the device option under Dolphin is:
An error occurred while accessing '353,8 GiB Encrypted Drive', the system responded: The requested operation has failed: Error unlocking /dev/sda3: Failed to activate device: Operation not permitted
I tried a lot but I don't know how resolve it.
These are fstab, crypttab e luks-keys and a screenshot of the Disks:
disks
disks
disks.png (43.97 KiB) Viewed 735 times

Code: Select all

$ cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Tue Jun  2 19:17:12 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=9e6d4245-d389-445d-a789-aa734ed60210 /boot                   xfs     defaults        0 0
/dev/disk/by-uuid/c92cd347-5f64-4049-bd61-7d2319d4e210 /mnt/dati auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/mapper/centos-root / xfs defaults,x-gvfs-name=root 0 0
/dev/mapper/centos-swap none swap sw 0 0
/dev/mapper/centos-home /home xfs defaults,x-gvfs-name=home 0 0
#/dev/disk/by-uuid/fb59bfc6-1478-42cc-a173-ab41c04062f9 /mnt/documenti auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/c3441f0a-a9f9-4601-9c75-6c2ab42de11e /mnt/scaricati auto nosuid,nodev,nofail,x-gvfs-show 0 0

$ sudo cat /etc/crypttab
luks-de8bf964-e193-4531-b951-30d2e14606c5 UUID=de8bf964-e193-4531-b951-30d2e14606c5 /etc/luks-keys/luks-de8bf964-e193-4531-b951-30d2e14606c5 nofail

$ ls -la /etc/crypttab
-rw-------. 1 root root 148  7 ago 15.12 /etc/crypttab

$ sudo ls -la /etc/luks-keys
totale 20
drwx------.   2 root root    55 30 apr 23.08 .
drwxr-xr-x. 175 root root 12288  7 ago 15.48 ..
-rw-------.   1 root root     9 30 apr 23.08 luks-de8bf964-e193-4531-b951-30d2e14606c5
1st strange point: partition it isn't inside the fstab, the line present but commented is the old partition's UUID before the encryption.

2nd strange point: luks-de8bf964-e193-4531-b951-30d2e14606c5 doesn't containn the real passphrase as I thought o_O
The creation date of the file is not align with the encryption of the partition because I made it in the 2021,probably on April I made some attempts for automount the partition at boot (after inserted only 1 password at boot). These attempts that made the request appear at boot but it doesn't resolved the mount then I never insert any password at bot and leave until pc continue the boot and I mounting the partition manually via Dolphin.

3rd strange point: I cannot add another passphrase to my partition...

Code: Select all

# cryptsetup luksOpen --test-passphrase /dev/sda3 --debug
# cryptsetup 2.0.3 processing "cryptsetup luksOpen --test-passphrase /dev/sda3 --debug"
# Running command open.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/sda3.
# Trying to open and read device /dev/sda3 with direct-io.
# Initialising device-mapper backend library.
# Trying to load any crypt type from device /dev/sda3.
# Crypto backend (gcrypt 1.5.3) initialized in cryptsetup library version 2.0.3.
# Detected kernel Linux 3.10.0-1160.71.1.el7.x86_64 x86_64.
# PBKDF pbkdf2, hash sha256, time_ms 2000 (iterations 0), max_memory_kb 0, parallel_threads 0.
# Reading LUKS header of size 1024 from device /dev/sda3
# Key length 32, device size 742064128 sectors, header size 2050 sectors.
# Checking volume passphrase using token -1.
# Interactive passphrase entry requested.
Inserire la passphrase per /dev/sda3: 
# Checking volume passphrase [keyslot -1] using passphrase.
# Trying to open key slot 0 [ACTIVE_LAST].
# Reading key slot 0 area.
# Using userspace crypto wrapper to access keyslot area.
# Trying to open key slot 1 [INACTIVE].
# Trying to open key slot 2 [INACTIVE].
# Trying to open key slot 3 [INACTIVE].
# Trying to open key slot 4 [INACTIVE].
# Trying to open key slot 5 [INACTIVE].
# Trying to open key slot 6 [INACTIVE].
# Trying to open key slot 7 [INACTIVE].
No key available with this passphrase.
# Interactive passphrase entry requested.
Inserire la passphrase per /dev/sda3: 
I'm quite sure about the passphrase do I insert in my password application...

I know that it's quite complex, but if someone have an idea I appreciate :)

akiro
Posts: 5
Joined: 2021/03/13 16:13:01

Re: LUKS Error unlocking Operation not permitted

Post by akiro » 2022/08/09 22:04:53

Ok, it can be close, I found the correct passphrase! :D

Post Reply