ubuntu取消主目录加密_如何在Ubuntu上恢复加密的主目录

ubuntu取消主目录加密

ubuntu取消主目录加密

image

Access an encrypted home directory when you’re not logged in – say, from a live CD – and all you’ll see is a README file. You’ll need a terminal command to recover your encrypted files.

当您未登录时(例如,从实时CD)访问加密的主目录,您将看到的只是一个README文件。 您将需要一个终端命令来恢复您的加密文件。

You should also back up your mount passphrase ahead of time – you may need this in the future. While eCryptfs normally decrypts your files with your login passphrase, the mount passphrase may be necessary if eCryptfs’s files become lost.

您还应该提前备份装载密码短语–将来可能会需要。 尽管eCryptfs通常使用您的登录密码来解密文件,但是如果eCryptfs的文件丢失了,则可能需要挂载密码。

备份加密密码短语 (Back Up Encryption Passphrase)

If you use an encrypted Ubuntu home directory, you should keep a backup copy of your mount passphrase. You’ll see a dialog prompting you to do so after encrypting your home directory. Write down this passphrase and keep it somewhere safe – you may need it to recover your files in the future.

如果使用加密的Ubuntu主目录,则应保留安装密码的备份副本。 加密主目录后,您会看到一个对话框提示您这样做。 写下该密码短语并将其保存在安全的地方–将来可能需要它来恢复文件。

image

If you want to acquire this mount passphrase at a later date, just run the ecryptfs-unwrap-passphrase command while logged in.

如果您想在以后获取此安装密码,只需在登录时运行ecryptfs-unwrap-passphrase命令即可。

image

You can still recover your encrypted files without this mount passphrase, assuming the ecryptfs wrapped passphrase is still available on your hard drive. However, if you lose this data or it becomes corrupted, you’ll need the mount passphrase to recover your files.

您仍然可以在没有此安装密码的情况下恢复加密文件,前提是您的硬盘驱动器上仍保留了ecryptfs包装的密码。 但是,如果丢失此数据或数据损坏,则需要安装密码短语来恢复文件。

从Live CD中恢复 (Recovering From a Live CD)

You can recover your files by booting from a Ubuntu live CD or USB drive. If you still have the disc or USB drive you installed Ubuntu from, you can use that. Otherwise, you can download an ISO from Ubuntu’s website and place it on a CD, DVD, or USB drive.

您可以通过从Ubuntu Live CD或USB驱动器启动来恢复文件。 如果仍然有从中安装Ubuntu的光盘或USB驱动器,则可以使用它。 否则,您可以从Ubuntu网站下载ISO并将其放在CD,DVD或USB驱动器上。

Log in to the live Ubuntu environment and ensure the partition containing your encrypted home directory is mounted. You can easily mount it by clicking It in the file manager – you’ll see an eject (unmount) icon, indicating the partition is mounted.

登录到实时Ubuntu环境,并确保已安装包含加密主目录的分区。 您可以通过在文件管理器中单击“它”来轻松安装它-您将看到一个弹出(卸载)图标,指示该分区已安装。

image

Next, fire up a terminal and run the following command to search your mounted file systems for encrypted private directories

接下来,启动一个终端并运行以下命令以在已安装的文件系统中搜索加密的私有目录

sudo ecryptfs-recover-private

sudo ecryptfs恢复专用

image

The command will offer to recover an encrypted directory if it locates one.

如果找到一个加密目录,该命令将提供恢复该目录的功能。

image

Assuming the command found a wrapped passphrase file on your system, it will prompt you for your login passphrase. If it doesn’t find this file, you’ll need the mount passphrase from the ecryptfs-unwrap-passphrase command – hopefully you have a copy of this. If you don’t, you can’t recover your files.

假设该命令在您的系统上找到了一个包装好的密码短语文件,它将提示您输入登录密码短语。 如果找不到该文件,则需要使用ecryptfs-unwrap-passphrase命令中的mount密码-希望您有一个副本。 否则,您将无法恢复文件。

image

The command will mount the encrypted directory in your /tmp directory.

该命令会将加密的目录挂载到/ tmp目录中。

image

You can access this directory to view the decrypted versions of your files. However, you may not have read access to this directory as the live CD user.

您可以访问此目录以查看文件的解密版本。 但是,您可能没有实时CD用户对此目录的读取权限。

image

To access the directory with a graphical file browser, run Nautilus as root. Press Alt+F2, type gksu nautilus, and press Enter.

要使用图形文件浏览器访问目录,请以root用户身份运行Nautilus。 按Alt + F2,键入gksu nautilus ,然后按Enter。

image

You’ll be able to access your files from the Nautilus window running as root. From here, you can easily copy the files to an external hard drive or another location.

您将可以从以root用户身份运行的Nautilus窗口中访问文件。 从这里,您可以轻松地将文件复制到外部硬盘驱动器或其他位置。

image

翻译自: https://www.howtogeek.com/116297/how-to-recover-an-encrypted-home-directory-on-ubuntu/

ubuntu取消主目录加密

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值