重新安装后,从分离分区解密$ HOME

以前,我安装了10.10有三个分区–sda1- / boot(ext2)sda2 – /(btrfs)sda3- / home(btrfs) 。 我选择了加密的主文件夹。 现在在同一台机器上我安装了10.04(LTS),在同一个sda1上选择了新的/ boot,/在同一个sda2(ext4)和sda3(home)上选择了早期安装时未触及的

我的问题是,现在我无法使用早期家庭用户的密码短语访问/安装我以前的家庭ecryptfs-mount-private util。 这是错误: 加密的私人目录未正确设置。 我还安装了btrfs实用程序。

那么是否有任何解决方案/解决方法可以访问不同分区上的$ home。

幸运的你! 我只是遇到了同样的问题,并编写了一个脚本,可以帮助用FNEK安装ecryptfs文件夹。

sudo su - 

然后打开nano / vim /您选择的编辑器并创建一个文件ecryptfs-fnek-helper.sh其中包含以下内容:

 #!/bin/bash # Thanks to https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/455709 # echo "Where is the /home with the .ecryptfs mounted? (default=/mnt/home)" read home_ecryptfs if [ -z "$home_ecryptfs" ]; then home_ecryptfs=/mnt/home fi home_ecryptfs=$home_ecryptfs/.ecryptfs echo "Whose encrypted home would you like to mount?" read user if [ -z "$user" ]; then echo "You have to enter a user!" exit; fi echo "What is the user's password?" read -s password if [ -z "$password" ]; then echo "You have to enter a password!" exit; fi echo "Where would you like to mount it? (Default: /mnt/[username])" read target if [ -z "$target" ]; then target=/mnt/$user fi target=$target/ mkdir -p $target wrapped=$home_ecryptfs/$user/.ecryptfs/wrapped-passphrase sig=$home_ecryptfs/$user/.ecryptfs/Private.sig private=$home_ecryptfs/$user/.Private/ echo I will be mounting $private into $target. echo "Clearing the keyring." keyctl clear @u keyctl list @u echo "Unwrapping passphrase and inserting it into key:" printf "%s" $password | ecryptfs-insert-wrapped-passphrase-into-keyring $wrapped - keyctl list @u echo -e "\e[0;92mPassphrase:" echo -e '\e[1;92m'`printf "%s" $password | ecryptfs-unwrap-passphrase $wrapped - `'\e[0m' echo -e "\e[0;96mFilename Encryption Key (FNEK) Signature:" echo -e '\e[1;96m'`tail -n1 $sig`'\e[0m' echo -e "Mounting now! Be sure to enable FNEK!" mount.ecryptfs $private $target -o ecryptfs_cipher=aes,ecryptfs_key_bytes=16,key=passphrase 

这将打开您的密码并将其添加到密钥环。 它还将显示passhprase和正确的FNEK签名,因此您可以在mount.ecryptfs提示时复制/粘贴它们。

使文件可执行并在su中运行它:

 chmod +x ecryptfs-fnek-helper.sh ./ecryptfs-fnek-helper.sh 

您可以尝试使用以下命令解密主目录:

 sudo ecryptfs-add-passphrase --fnek sudo mount -t ecryptfs /home/username /home/username -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n,,ecryptfs_enable_filename_crypto=yes 

如果尚未加密文件名,请删除与密码相关的命令/ args。 你可以在这里找到关于mouting ecryptfs的更多信息。 最好的祝福。