Ubuntu – Encrypted $HOME files showing to root, how to make it hidden again


My home directory is encrypted with ecryptfs. I booted and logged in straight into root. Root see my home directory before I log in, but it shouldn't, and it wasn't that transparent.

However, when I check /home, the /myusername/.ecryptfs folder is there normally, and so is the .Private. So, it seems that encryption is there.


  • No changed passwords between the dates, so that isn't it.

  • It can be a coincidence, but I noticed that this happened after I used a common trick to dismiss the keyring asking for wifi password on login (the one you change the default keyring and leave wifi password as clear text).

My question is:

  • How can I make it hidden to root again without changing my user password?

Best Answer

eCryptfs does not protect your data from root. eCryptfs is only sufficient to protect your data at rest on the physical media.

After you've logged into the system as your user, your decrypted data is only protected by Discretionary Access Controls (DAC). This is generally enough to protect you against other non-root users on the system, but not root.

Also, are you absolutely sure that never entered your non-root user's password on this system after booting? Because the situation you describe is impossible -- root would never be able to see your decrypted data if you haven't logged in yet. This is how eCryptfs protects you against LiveCD attacks.