【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
相关推荐
每天更新19 分钟前
linux内核时间&定时器&延时
linux·运维·服务器
snpgroupcn21 分钟前
SAP S/4HANA迁移方法选哪种?选择性数据转换是否合适?企业需要考虑哪些关键因素!
运维·数据库·云计算
杜子不疼.23 分钟前
【Linux】冯 • 诺依曼体系结构
linux·运维·服务器
门前灯28 分钟前
Linux系统之msgexec 命令详解
linux·运维·服务器·msgexec
简一之学无止境33 分钟前
Linux中信号量semaphore的实现
linux
空荡forevere1 小时前
《操作系统真象还原》 第九章 第二部分
ubuntu·云计算
Jzzzzzzzzzzzzzz2 小时前
NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.
ubuntu·nvidia·显卡驱动
東雪蓮☆2 小时前
MySQL 全量 + 增量备份脚本(RPM 安装)实践与问题解析
linux·运维·mysql
落羽的落羽2 小时前
【Linux系统】快速入门一些常用的基础指令
linux·服务器·人工智能·学习·机器学习·aigc
妮妮喔妮2 小时前
docker-compose端口冲突问题
运维·docker·容器