Ubuntu 14.04.1 加密主目录

Ubuntu 14.04.1 加密主目录

我正在尝试加密用户的主目录。我发现了这一点howtogeek 上的指南

然后,我在全新安装 Ubuntu 14.04.1(开始之前安装了所有更新)的虚拟机上测试了该指南,并且一切按照教程中的描述进行。

现在我尝试在我的用户系统上复制它。

$ sudo apt-get install ecryptfs-utils cryptsetup
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cryptsetup is already the newest version.
ecryptfs-utils is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

$ sudo ecryptfs-migrate-home -u <username>
INFO:  Checking disk space, this may take a few moments.  Please be patient.
INFO:  Checking for open files in /home/<username>
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/112/gvfs
      Output information may be incomplete.
Enter your login passphrase [<username>]: 

************************************************************************
YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.
  ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase
THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.
************************************************************************

Done configuring.

chown: cannot access ‘/dev/shm/.ecryptfs-<username>’: No such file or directory
mount: No such file or directory
ERROR:  Could not mount

当我检查它所抱怨的路径时,它看起来很奇怪,但稍微谷歌一下就表明这是保险丝所期望的。

$ sudo ls -lash /run/user/112/
ls: cannot access /run/user/112/gvfs: Permission denied
total 0
0 drwx------ 6 lightdm lightdm 140 Oct 31 11:06 .
0 drwxr-xr-x 4 root    root     80 Oct 31 11:05 ..
0 drwx------ 2 lightdm lightdm  60 Oct 31 11:05 dconf
? d????????? ? ?       ?         ?            ? gvfs
0 drwx------ 2 lightdm lightdm  80 Oct 31 11:04 pulse
0 drwx------ 3 lightdm lightdm  60 Oct 31 11:04 upstart
0 lrwxrwxrwx 1 root    root     17 Oct 31 11:04 X11-display -> /tmp/.X11-unix/X0 

并且它抱怨找不到的文件实际上似乎并不存在。

$ sudo ls -lash /dev/shm/.ecryptfs-<username>
ls: cannot access /dev/shm/.ecryptfs-rob: No such file or directory
$ sudo ls -lash /dev/shm/
total 144K
   0 drwxrwxrwt  2 root    root    100 Oct 31 11:04 . 
   0 drwxr-xr-x 24 root    root    800 Oct 31 11:05 ..
 68K -rwx------  1 lightdm lightdm 65M Oct 31 11:04 pulse-shm-1911916644
 72K -rwx------  1 lightdm lightdm 65M Oct 31 11:04 pulse-shm-1958822985
4.0K -rwx------  1 lightdm lightdm 65M Oct 31 11:04 pulse-shm-2556483462

而我已经没有能力继续下去了。

答案1

我使用了第二个用户的桌面会话,并且它运行完美,看来通过 SSH 无法实现。

答案2

您只需登录即可其他用户比要通过加密的用户SSH或本地。我暂时登录直接地root不是我的 sudoer 用户。

注意:以要加密的用户身份登录$HOME,然后执行sudo -u rootsudo su root不是工作。

答案3

通过 ssh 似乎无法实现。相反,您应该使用“另一个”用户的 tty,然后执行以下操作:https://www.howtogeek.com/116032/how-to-encrypt-your-home-folder-after-installing-ubuntu/

相关内容