我尝试更改我的 LUKS 密码。
\n\n我使用的来源:\n https://www.linuxexperten.com/content/how-do-i-change-my-luks-encryption-password-and-more
\n\n我有单独的分区 \xe2\x80\x99s 用于启动、根目录、交换和主目录。\n要确定哪些分区有 Luks:
\n\nblkid -t TYPE=crypto_LUKS -o device\n/dev/sda5\n/dev/sda6\n/dev/sda7\nRun Code Online (Sandbox Code Playgroud)\n\n然后检查sda5占用了多少个槽位。
\n\n$ sudo cryptsetup luksDump /dev/sda5 |grep Key.Slot\n\nKey Slot 0: ENABLED\nKey Slot 1: DISABLED\nKey Slot 2: DISABLED\nKey Slot 3: DISABLED\nKey Slot 4: DISABLED\nKey Slot 5: DISABLED\nKey Slot 6: DISABLED\nKey Slot 7: DISABLED\nRun Code Online (Sandbox Code Playgroud)\n\n显然 root 可以使用主密钥来添加新密钥:
\n\n$ sudo dmsetup ls --target crypt\n\nswapfs (254, 2)\nrootfs (254, 0)\nhomefs (254, 1)\nRun Code Online (Sandbox Code Playgroud)\n\n但后来我说让我检查一下其他分区 sda6 和 7,看看有多少个插槽被占用。更改密码前已有两个已被占用。
\n\n$ sudo cryptsetup luksDump /dev/sda6 |grep Key.Slot\n\nKey Slot 0: ENABLED\nKey Slot 1: ENABLED\nKey Slot 2: DISABLED\nKey Slot 3: DISABLED\nKey Slot 4: DISABLED\nKey Slot 5: DISABLED\nKey Slot 6: DISABLED\nKey Slot 7: DISABLED\n\n\n$ sudo cryptsetup luksDump /dev/sda7 |grep Key.Slot\n\nKey Slot 0: ENABLED\nKey Slot 1: ENABLED\nKey Slot 2: DISABLED\nKey Slot 3: DISABLED\nKey Slot 4: DISABLED\nKey Slot 5: DISABLED\nKey Slot 6: DISABLED\nKey Slot 7: DISABLED\nRun Code Online (Sandbox Code Playgroud)\n\n我知道所有三个分区都有相同的密码。\n我没有 LUKS 的任何其他密码。\n这是否意味着\xe2\x80\x9c 其他人可以访问\xe2\x80\x9d这两个分区?
\n启动时需要输入多少次密码?如果只有一次,则可能会使用其中一个插槽来“链接”加密:
您可能会在 中看到这方面的证据/etc/crypttab,其中会显示密钥文件的位置。
PS:如果有人想秘密访问您的加密数据,并且有足够的访问权限可以安装另一个密钥,他们只需获取主密钥的副本即可。这不会留下任何证据,并且无论密码如何更改都允许解密。解决这个问题的唯一方法是重新加密整个分区。(简而言之,LUKS 的工作原理是使用密码来加密主密钥。然后使用主密钥来加密分区。这就是为什么您可以更改密码而无需重新加密整个驱动器。)
| 归档时间: |
|
| 查看次数: |
411 次 |
| 最近记录: |