GNU/Linux >> Linux の 問題 >  >> Ubuntu

再インストール後に別のパーティションから$homeを復号化しますか?

以前は、3つのパーティション( sda1- / boot(ext2)sda2-/(btrfs)sda3- / home(btrfs))を使用して10.10をインストールしていました。 。そして、暗号化されたホームフォルダを選択しました。同じマシンに10.04(LTS)をインストールし、同じsda1、/同じsda2(ext4)および sda3(home)に新しい/bootを選択してそのままにしました 以前のインストールから。

私の問題は、 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

Ubuntu
  1. 保存済みリストからアクセスポイントを削除するにはどうすればよいですか?

  2. ライブUSBからLuksで暗号化されたパーティションをマウントできませんか?

  3. Ubuntuを15から16.04にアップデートした後、キーボード構成パッケージでエラーが発生しましたか?

  1. ホームディレクトリをマージしますか?

  2. 別のパーティションを/homeとして再マウントする方法は?

  3. 非標準インストール(LinuxからLinuxをインストール)?

  1. Ubuntu –別のパーティションを別のホームパーティションのフォルダとして永続的にマウントするにはどうすればよいですか?

  2. ホームパーティションを暗号化する方法は?

  3. 15.04から15.10にアップグレードした後、ネットワークスキャナー(canon)が停止しますか?