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

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

一、安装软件与使用

1.安装ecryptfs

在终端下输入:

bash 复制代码
sudo apt-get install ecryptfs-utils

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

bash 复制代码
ecryptfs-setup-private

输入密码。

最后两行,yes, no

bash 复制代码
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挂载了, 我先卸载

bash 复制代码
sudo umount /home/xiaoxin/Private

2. 删除.ecryptfs文件夹

bash 复制代码
(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              .thunderbird
 Desktop         .pki                  .ut_storage
 .dmrc           .presage              Videos
 Documents       .Private              .vscode
 Downloads       Private               .wget-hsts
 .ecryptfs       .profile              .Xauthority
 .gem            .psensor              .xinputrc
 .gnupg          Public                .xsession-errors
 .imagej         .python_history       .xsession-errors.old

根目录下删除

bash 复制代码
(base) xiaoxin@xiaoxin:~$ sudo rm -rf .ecryptfs

3. apt remove

bash 复制代码
sudo apt-get remove ecryptfs-utils libecryptfs0
相关推荐
一位摩羯座DBA31 分钟前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组32 分钟前
CentOS配置网络
linux·网络·centos
weixin_307779131 小时前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
漫步企鹅2 小时前
【蓝牙】Linux Qt4查看已经配对的蓝牙信息
linux·qt·蓝牙·配对
cui_win2 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
梦在深巷、2 小时前
MySQL/MariaDB数据库主从复制之基于二进制日志的方式
linux·数据库·mysql·mariadb
风清再凯2 小时前
自动化工具ansible,以及playbook剧本
运维·自动化·ansible
深圳安锐科技有限公司2 小时前
深圳安锐科技发布国内首款4G 索力仪!让斜拉桥索力自动化监测更精准高效
运维·安全·自动化·自动化监测·人工监测·桥梁监测·索力监测
猫头虎2 小时前
猫头虎 AI工具分享:一个网页抓取、结构化数据提取、网页爬取、浏览器自动化操作工具:Hyperbrowser MCP
运维·人工智能·gpt·开源·自动化·文心一言·ai编程
冰橙子id2 小时前
linux系统安全
linux·安全·系统安全