Quantcast
Viewing all articles
Browse latest Browse all 4447

Decrypt user home after installing Ubuntu 22.04

I have a laptop with two mount points, one with the system (/) and another with the /home folder. My user folder in /home was encrypted with Ubuntu 20.04.

This morning I re-installed the system with the new Ubuntu 22.04 ISO. I formatted the system partition and let the /home partition be. I provided the same user name and password as explained in this earlier answer.

Logging in Ubuntu 22.04 is not decrypting the user home folder. Most applications fail to start as they are not able to write in the user home.

I have both the log-in password and the passphrasenecessary to decrypt the home folder. Therefore I tried to decrypt the folder manually, butecryptfs-recover-private returns an error (see below).

How can I mount the user home folder encrypted by Ubuntu 20.04?

$ sudo ecryptfs-recover-private /home/lads/.PrivateINFO: Found [/home/duque004/.Private].Try to recover this directory? [Y/n]: YINFO: Found your wrapped-passphraseDo you know your LOGIN passphrase? [Y/n] YINFO: Enter your LOGIN passphrase...Passphrase: Inserted auth tok with sig [3c9323dd0ed2026f] into the user session keyringmount: /tmp/ecryptfs.6IGtBsCb: mount(2) system call failed: No such file or directory.ERROR: Failed to mount private data at [/tmp/ecryptfs.6IGtBsCb].

Update: I found an old thread at the Arch Linux forum reporting a similar issue and providing a workaround, manually mounting the encrypted volume. This method succeeds in mounting the volume and showing the contents of the folder tree root, but it does not provide access to any files or folders. Log below, changing dir, listing or copying any of the contents in mnt/bck fails.

# cd /home/.ecryptfs/lads/.ecryptfs# ecryptfs-unwrap-passphrase ./wrapped-passphrasePassphrase:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# ecryptfs-add-passphrase --fnekPassphrase:Inserted auth tok with sig [aaaaaaaaaaaa] into the user session keyringInserted auth tok with sig [bbbbbbbbbbbb] into the user session keyring# mount -t ecryptfs /home/.ecryptfs/lads/.Private /mnt/bckSelect key type to use for newly created files: 1) tspi 2) passphraseSelection: 2Passphrase:Select cipher: 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16Selection [aes]:Select key bytes: 1) 16 2) 32 3) 24Selection [16]:Enable plaintext passthrough (y/n) [n]: nEnable filename encryption (y/n) [n]: yFilename Encryption Key (FNEK) Signature [aaaaaaaaaaaa]: bbbbbbbbbbbbAttempting to mount with the following options:  ecryptfs_unlink_sigs  ecryptfs_fnek_sig=bbbbbbbbbbbb  ecryptfs_key_bytes=16  ecryptfs_cipher=aes  ecryptfs_sig=aaaaaaaaaaaaMounted eCryptfs# ls /mnt/bck | grep gitgit# ls -la /mnt/bck/gitls: cannot access '/mnt/bck/git': No such file or directory# cp /mnt/bck/.bash*ls: cannot access '/mnt/bck/.bash_aliases': No such file or directoryls: cannot access '/mnt/bck/.bash_history': No such file or directoryls: cannot access '/mnt/bck/.bash_logout': No such file or directoryls: cannot access '/mnt/bck/.bashrc': No such file or directory

Viewing all articles
Browse latest Browse all 4447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>