当前位置: 首页> 健康> 知识 > 【ubuntu】 ecryptfs加密(安装、使用、卸载)

【ubuntu】 ecryptfs加密(安装、使用、卸载)

时间:2025/7/10 17:33:58来源:https://blog.csdn.net/weixin_48846514/article/details/139958035 浏览次数:0次

【ubuntu】 ecryptfs加密(安装、使用、卸载)

  • 一、安装软件与使用
    • 1.安装ecryptfs
    • 2.创建登录密码和挂载密码
    • 3. 挂载文件夹
    • 4. 在文件夹里创建文档
    • 5.卸载文件夹
  • 2.卸载软件
    • 1. 卸载private文件夹
    • 2. 删除.ecryptfs文件夹
    • 3. apt remove

一、安装软件与使用

1.安装ecryptfs

在终端下输入:

sudo apt-get install ecryptfs-utils

2.创建登录密码和挂载密码

ecryptfs-setup-private

输入密码。
最后两行,yes, no

Would you like to proceed with the mount (yes/no)?  yes  你从未用这个密码挂载过,是否继续?
Would you like to append sig [86a764759a1f7625] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)?  no  是否将此次挂载信息记录下来以免下次报警?
Not adding sig to user sig cache file; continuing with mount.

3. 挂载文件夹

mount -t ecryptfs /opt/test /opt/test
一直回车

4. 在文件夹里创建文档

5.卸载文件夹

umount -t ecryptfs /opt/test

2.卸载软件

1. 卸载private文件夹

由于我有一个private挂载了, 我先卸载

sudo umount /home/xiaoxin/Private

2. 删除.ecryptfs文件夹

(base) xiaoxin@xiaoxin:~$ ls -a.               .java                 .selected_editor..              .local                sensors.bash_history   log                   snap.bash_logout    .mozilla              .sogouinput.bashrc         Music                 .ssh.cache          .nv                   .sudo_as_admin_successful.conda          .nvidia-settings-rc  'Sunlogin Files'.config         .pam_environment      Templates.dbus           Pictures              .thunderbirdDesktop         .pki                  .ut_storage.dmrc           .presage              VideosDocuments       .Private              .vscodeDownloads       Private               .wget-hsts.ecryptfs       .profile              .Xauthority.gem            .psensor              .xinputrc.gnupg          Public                .xsession-errors.imagej         .python_history       .xsession-errors.old

根目录下删除

(base) xiaoxin@xiaoxin:~$ sudo rm -rf .ecryptfs

3. apt remove

sudo apt-get remove ecryptfs-utils libecryptfs0
关键字:【ubuntu】 ecryptfs加密(安装、使用、卸载)

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: