我希望cryptsetup提示我输入密码,但是它只是试图打开一个密钥文件却失败了:
sudo cryptsetup luksFormat test.img cryptsetup-test
WARNING!
========
This will overwrite data on test.img irrevocably.
Are you sure? (Type uppercase yes): YES
Failed to open key file.发布于 2018-04-05 11:26:41
您混淆了luksFormat和luksOpenluksOpen的语法。
luksFormat不会打开设备,因此不会使用要映射到的设备名称。因此,如果您试图传递一个,它将解释为一个密钥文件的文件名,并尝试(可能失败)打开它。
当您使用每个命令时,如下所示:
sudo cryptsetup luksFormat test.img
WARNING!
========
This will overwrite data on test.img irrevocably.
Are you sure? (Type uppercase yes): YES
Enter passphrase:
Verify passphrase:还有一个luksOpen的例子:
sudo cryptsetup luksOpen test.img cryptsetup-test
Enter passphrase for test.imghttps://unix.stackexchange.com/questions/435731
复制相似问题