How to decrypt home folder
Hi,
I installed Ubuntu 12.04 on a 2TB drive and encrypted the home directory.
Shortly I couldn't login any more, so to recover the encrypted directory.the 2TB drive has been installed as a second drive in another Ubuntu system.
I navigated to the encrypted home directory and in the folder /home/adrian/ found the files:
/cache
/Access-Your-private-Data.desktop
/README.txt
/.ecryptfs
/.private
/.ecryptfs/adrian/.ecryptfs
/auto-mount
/auto-umount
/Private.mnt
/Private.sig
/wrapped-passphrase
/.wrapped-passphrase.recorded
/.Private/
/ Access-Your-private-Data-Desktop
/ README.txt
Access-Your-private-Data.desktop file contains:
[Desktop Entry]
_Name=Access Your Private Data
_GenericName=Access Your Private Data
Exec=/usr/bin/ecryptfs-mount-private
Terminal=true
Type=Application
Categories=System;Security;
X-Ubuntu-Gettext-Domain=ecryptfs-utils
README.txt file contains:
THIS DIRECTORY HAS BEEN UNMOUNTED TO PROTECT YOUR DATA.
From the graphical desktop, click on:
"Access Your Private Data"
or
From the command line, run:
ecryptfs-mount-private
I opened a terminal and fired some commands:
1. fdisk command:
adi@adi-1:~$ sudo fdisk -l
[sudo] password for adi:
Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD20EARS-00M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00080dae
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 1945403391 1945401344 927.7G 83 Linux
/dev/sdb2 1945405438 1953523711 8118274 3.9G 5 Extended
/dev/sdb5 1945405440 1953523711 8118272 3.9G 82 Linux swap / Solaris
Partition 2 does not start on physical sector boundary.
2. sudo ecryptfs-recover-private command launched from the 2TB drive:
adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$ sudo ecryptfs-recover-private
INFO: Searching for encrypted private directories (this might take a while)...
find: ‘/run/user/1000/gvfs’: Permission denied
adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$
3. sudo ecryptfs-mount-private command launched from the 2TB drive:
adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$ sudo ecryptfs-mount-private
[sudo] password for adi:
ERROR: Encrypted private directory is not setup properly
adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$
Apparently there is a permission issue.
Could you let me know what commands to use and how to fix the permission issue.
Thanks,
Andrew
Last edited by andrew262; 06-08-2023 at 07:00 AM.
|