Ubuntu 18.04: 挂载加密磁盘

分享于 

3分钟阅读

ubuntu

  繁體

问题

尝试:


$ sudo ecryptfs-recover-private



它无法访问一些文件,


cd /media/new_user/old_disk/.ecryptfs/old_user


sudo ecryptfs-recover-private .Private/



它给出了:


INFO: Found [.Private/].


Try to recover this directory? [Y/n]: Y


INFO: Found your wrapped-passphrase


Do you know your LOGIN passphrase? [Y/n] n


INFO: To recover this directory, you MUST have your original MOUNT passphrase.


INFO: When you first setup your encrypted private directory, you were told to record


INFO: your MOUNT passphrase.


INFO: It should be 32 characters long, consisting of [0-9] and [a-f].



Enter your MOUNT passphrase: 


mount: /tmp/ecryptfs.lFwWFlD4: mount(2) system call failed: No such file or directory.



ERROR: Failed to mount private data at [/tmp/ecryptfs.lFwWFlD4].




答案1

[XXX] process_request_key_err : no key could not find valid key in user session keyring for sig specified in mount option : [XXX ]

然后,尝试手动添加密码。


答案2


ecryptfs-recover-private /media/<username>/<disk-guid>/home/.ecryptfs/<username>/.Private


ecryptfs-recover-private




ecryptfs-recover-private /home/old_user/.Private




答案3

当我尝试使用ecryptfs-recover-private访问旧加密数据时,在安装18.04后遇到同样的问题,我可以通过执行以下操作来解决这个问题:

解开旧挂载口令

如果知道此挂载口令,你可以跳过此步骤)

假设当前工作目录是以前的主分区,通过键入


ecryptfs-unwrap-passphrase .ecryptfs/old_user/.ecryptfs/wrapped-passphrase



这要求你的旧登录密码,并输出你的旧挂载密码。

将挂载口令添加到内核密钥环

通过


printf"%s""mount_passphrase" | ecryptfs-add-passphrase --fnek -



--fnek选项可能不是必需的,但它对我有用。

在/tmp中挂载加密数据


sudo ecryptfs-recover-private .ecryptfs/old_user/.Private/




相关文章