Linux_User157 wrote:Yes. I can't get to the files.
OK, try this one line at a time:
Code: Select all
sudo -i
export envvars='opts fnek fnek_sig d sigs mount_sig mount_opts tmpdir'
for o in $envvars;do export "$o=";done; opts=ro;tmpdir=/tmp/mine
/sbin/cryptsetup luksOpen /dev/sdb3 crypt
mount /dev/mapper/mint--vg-root /mnt
For the following replace wharfrat with your user's /home folder name
Code: Select all
d=$(find /mnt/home/.ecryptfs/wharfrat -type d -name ".Private") && echo "$d"
ls "$d/ECRYPTFS_FNEK_ENCRYPTED"* >/dev/null 2>&1 && fnek="--fnek" || fnek=
ecryptfs-insert-wrapped-passphrase-into-keyring "$d/../.ecryptfs/wrapped-passphrase" # Enter the user's password when prompted
sigs=$(sed -e "s/[^0-9a-f]//g" "$d/../.ecryptfs/Private.sig") && echo "$sigs"
If you get 1 line with characters and numbers then follow the next three lines
Code: Select all
mount_sig=$(echo "$sigs" | head -n1) && echo "$mount_sig"
fnek_sig=
mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16" && echo "$mount_opts"
otherwise if the result is two lines then use these
Code: Select all
mount_sig=$(echo "$sigs" | head -n1) && echo "$mount_sig"
fnek_sig=$(echo "$sigs" | tail -n1) && echo "$fnek_sig"
mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_fnek_sig=$fnek_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16" && echo "$mount_opts"
Code: Select all
mkdir "$tmpdir"
mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"
ls -lh /tmp/mine
Your files should be accessable in /tmp/mine