7

I messed up with my files... Again... Now I am concerned if I will be able to login again once I logout. Is there a way to test if the essentials files are all there?

  1. My home was encrypted during the installation (Ubuntu 12.04).
  2. By login I mean boot Ubuntu into lightdm, type my password and be able to use my files which are encrypted and should be decrypted after the login.
  3. By messed up I mean I have moved all my ".xml" files under user directory. I do not care that much for the configuration of the applications, neither for my keyboard shortcuts as I have a backup for them.
  4. I can run ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase and it shows me the passphrase.
  5. At ~/.ecryptfs I have auto-mount auto-umount Private.mnt Private.sig wrapped-passphrase.

One Ecryptfs manual says:

$ man ecryptfs-setup-private


FILES
   ~/.ecryptfs/auto-mount

   ~/.Private - underlying directory containing encrypted data

   ~/Private - mountpoint containing decrypted data (when mounted)

   ~/.ecryptfs/Private.sig - file containing signature of mountpoint passphrase

   ~/.ecryptfs/Private.mnt - file containing path of the private directory mountpoint

   ~/.ecryptfs/wrapped-passphrase - file containing the mount passphrase, wrapped with the login passphrase

   ~/.ecryptfs/wrapping-independent  -  this  file  exists  if  the wrapping passphrase is independent from login passphrase

May be those all are the required files?

Edit:
I rebooted the computer and although I have lost the configuration of applications and Keyboard Shortcuts I was able to login again. So I can say that no xml file is needed to login into an Ubuntu encrypted home.
But the question remains valid: is there a way to test if one will be able to login in the next boot?

desgua
  • 33,215

3 Answers3

1

One possibility is to copy your entire home folder into another system (or virtual system), and see if you can log into this system.

This is not ideal and suffers from a few shortcomings.

  • It's not very convenient, as you would need to install a parallel system, and copy across an entire home folder (although you could exclude personal documents).
  • Since you don't want to risk logging out, the copied home directory will be copied from its "mounted" state, which might differ from the "logged out" state. However, I imagine that this is equivalent to a situation where your computer crashes and your home folder is preserved in its "mounted" state. I imagine that if it can mount after this pseudo-crash, then it should mount under normal circumstances.
Sparhawk
  • 6,969
1

The is no method that I know of to do what you describe. However if you struggle to graphically login to can get around this by login in via the terminal

Step One

boot and press e i the grub dialogue.

Step Two

Move the cursor down to the line which loads your kernel.

If you don't know what to look for then it should say something like either linux or linuxefi and be a long string of various letters, numbers and spaces that look like jibberish.

the line after it should say something like initrd -( you essentially need to go to the very end of the line just before the cursor reaches newline with initrd)

Step Three

type the followin before the end of the line (from step two)

rw init=/bin/bash

Step Four

press F10 to boot

Step Five

when you are in the terminal type

login yourusername

you will be prompted for your password and this should give you access.

Step Six

Type:

startx 

to get to a graphical login

Step Seven

if that doesn't work the error in /var/logs/Xorg.0 should tell you why it did not work and help you fix the problem.

Magpie
  • 1,295
0

You should be able to log in. I mean because the fact that you logged in again. I'm pretty sure those are all the needed files. I have a older version of Ubuntu and I after messing with the files was able to log in.

gb26
  • 13