Auparavant, j'avais installé 10.10 avec trois partitions - sda1-/boot(ext2) sda2-/(btrfs) sda3- /home(btrfs) . Et j'ai choisi le dossier personnel crypté. Maintenant, sur la même machine, j'ai installé 10.04 (LTS) en choisissant new /boot sur le même sda1, / sur le même sda2 (ext4) et sda3(home) laissé intact d'une installation antérieure.
Mon problème est que maintenant je ne peux pas accéder/monter ma maison précédente avec ecryptfs-mount-private
util avec la phrase de passe de l'utilisateur principal précédent. Voici l'ERREUR :Le répertoire privé chiffré n'est pas configuré correctement.
J'ai également installé les utilitaires btrfs.
Existe-t-il donc des solutions/contournements pour accéder à $home sur une partition différente.
Réponse acceptée :
Quel chanceux êtes-vous! Je viens d'avoir le même problème et j'ai écrit un script qui facilitera le montage des dossiers ecryptfs avec FNEK.
sudo su -
Ouvrez ensuite nano/vim/votre éditeur de choix et créez un fichier ecryptfs-fnek-helper.sh
avec le contenu suivant :
#!/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
Cela déballera votre phrase secrète et l'ajoutera au trousseau de clés. Il affichera également la passhprase et la signature FNEK correcte, afin que vous puissiez les copier/coller lorsque vous y êtes invité par mount.ecryptfs.
Rendez le fichier exécutable et exécutez-le toujours en su :
chmod +x ecryptfs-fnek-helper.sh
./ecryptfs-fnek-helper.sh