After /home encryption, unable to login

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
lingben

Re: After /home encryption, unable to login

Post by lingben »

shoot! sorry but in the confusion I made a mistake and didn't enter this command as WharfRat had suggested:

Code: Select all

~ $ sudo cp /etc/crypttab /etc/crypttab.bad
as a result I can't undo that by this command as you suggested:

Code: Select all

sudo mv /etc/crypttab.bad /etc/crypttab
mv: cannot stat '/etc/crypttab.bad': No such file or directory
should I enter this command to return it to the previous setting ?

Code: Select all

~ $ echo "cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256" | sudo tee /etc/crypttab
please advise (sorry!)

Thanks
Last edited by lingben on Mon Jul 20, 2015 10:04 pm, edited 1 time in total.
WharfRat

Re: After /home encryption, unable to login

Post by WharfRat »

Before doing anything else, update the initram and reboot

Code: Select all

sudo update-initramfs -u
lingben

Re: After /home encryption, unable to login

Post by lingben »

Before doing anything else, update the initram and reboot
done:

Code: Select all

~ $ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-37-generic
now, how to I undo since I forgot to copy to .bad ?

Thanks
WharfRat

Re: After /home encryption, unable to login

Post by WharfRat »

Did you still get the press s stuff :?:

Is swap working :?:

Code: Select all

free -h
lingben

Re: After /home encryption, unable to login

Post by lingben »

the message is still there during boot

swap is not working, it shows 0, and 0 for total, used and free
WharfRat

Re: After /home encryption, unable to login

Post by WharfRat »

This is Laurent85's recommended contents

Code: Select all

echo "cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,noearly" | sudo tee /etc/crypttab
Then update the initram again

Code: Select all

sudo update-initramfs -u
lingben

Re: After /home encryption, unable to login

Post by lingben »

thanks WharfRat,

Code: Select all

~ $ echo "cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,noearly" | sudo tee /etc/crypttab
[sudo] password for lingben: 
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,noearly
~ $ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-37-generic

Code: Select all

~ $ cat /etc/crypttab
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,noearly

Code: Select all

~ $ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jul 20 22:34 control
rebooted - unfortunately the error msg is still there

Code: Select all

~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=d04267aa-9974-4b36-90a1-bf510603cd2a /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
#UUID=faca53fd-40f8-4dc5-b0a3-35aa86760f50 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
on the plus side, swap is now active since

Code: Select all

free -m
shows total 2035 used 0 free 2035
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: After /home encryption, unable to login

Post by Laurent85 »

rebooted - unfortunately the error msg is still there
Actually it is not a blocking message since your systems boots correctly. There is no clue indicating the reason the message appears on boot. When this message appears on boot, it normally stops the boot process waiting for a user input since mounting some configured partitions is failing. Your setup has only root "/" configured for mounting on boot, which is correctly mounted, if not you would even don't have a running system.

Can you post back command output

Code: Select all

sudo parted -l
Image
lingben

Re: After /home encryption, unable to login

Post by lingben »

thanks, if it isn't a blocking message which doesn't seemingly affect the computer from operating normally and we can't figure out how to solve it, let's move on to the original issue: encrypting /home (swap I believe is already encrypted, right?)

here's the output of the command you requested:

Code: Select all

~ $ sudo parted -l
[sudo] password for lingben: 
Model: ATA Hitachi HTS54258 (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  77.9GB  77.9GB  primary   ext4         boot
 2      77.9GB  80.0GB  2135MB  extended
 5      77.9GB  80.0GB  2135MB  logical

Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/cryptswap1: 2135MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  2135MB  2135MB  linux-swap(v1)
Thank you.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: After /home encryption, unable to login

Post by Laurent85 »

swap I believe is already encrypted, right?
Yes.

Checklist before proceeding :
- it is recommended to backup your data
- Automatic login must be turned off
- a password is set for both users lingben and casper

Log in as your casper user account. From casper desktop environment, open a terminal then enter the command to migrate your lingben user account

Code: Select all

sudo ecryptfs-migrate-home -u lingben
Wait for the migration to procede. Once done :
- log out casper user session
- log in as user lingben
- check all your data there, all is working fine.
Image
lingben

Re: After /home encryption, unable to login

Post by lingben »

Laurent85 wrote: Checklist before proceeding :
- it is recommended to backup your data
- Automatic login must be turned off
- a password is set for both users lingben and casper
- this is a brand new fresh install so no personal data, just system stuff: OS, programs, customizations to OS and programs, etc.
- both the "login window preferences" setting and the "users settings" are set so there is no automatic login nor timed login with a password required on login and both users set as admin

ok, I think I'm set, going to go ahead and let you know how it went, fingers crossed :)

ok, I'm back, I think everything went well, I got the typical message at the end saying everything had finished successfully and giving me further instructions
http://cdn3.howtogeek.com/wp-content/up ... sua77j.png

as suggested I also did

Code: Select all

ecryptfs-unwrap-passphrase
to generate a random recovery passphrase and wrote it down

then logged back in as lingben and everything seems as before, the desktop, settings, etc.

small confession: at first, rather than logging out and then loggin as 'casper' I mistakenly used 'switch user' to get into that account which didn't work out as it told me that files from lingben were in use... oops!

so how do I check if my /home and swap is encrypted?

Code: Select all

~ $ ls -A /home
lingben  lingben.H93yq8i2  .ecryptfs  casper

Code: Select all

~ $ sudo blkid | grep swap
[sudo] password for lingben: 
/dev/mapper/cryptswap1: UUID="cdd3ecab-b1b1-4450-a570-6d10b17be7dd" TYPE="swap" 
that seems to check out, right?

So what now? leave the lingben.H93yq8i2 file there to make sure everything is a-ok for a few days and then remove it and the 'casper' user?

Thank you
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: After /home encryption, unable to login

Post by Laurent85 »

small confession: at first, rather than logging out and then loggin as 'casper' I mistakenly used 'switch user' to get into that account which didn't work out as it told me that files from lingben were in use... oops!
:mrgreen:
so how do I check if my /home and swap is encrypted?
Swap, check status

Code: Select all

sudo swapon -s
cryptswap1 encryption details

Code: Select all

sudo cryptsetup status cryptswap1
home user directory currently mounted using ecryptfs

Code: Select all

mount | grep ecryptfs
When your home directory is locked (not mounted), this is how your data looks like

Code: Select all

sudo ls -l /home/.ecryptfs/lingben/.Private
So what now? leave the lingben.H93yq8i2 file there to make sure everything is a-ok for a few days

Yes.
and then remove it and the 'casper' user?
Yes, remove it from lingben session destop environment using Users Settings.
Image
lingben

Re: After /home encryption, unable to login

Post by lingben »

here's the output for the commands, let me know if everything is ok.

also would appreciate short and simple explanation of what each one is checking for and what the output means. I searched online and tried explainshell.com but still not really clear on them.

Thank you :)

Code: Select all

~ $ sudo swapon -s
[sudo] password for lingben: 
Filename				Type		Size	Used	Priority
/dev/mapper/cryptswap1                  partition	2084860	0	-1

Code: Select all

~ $ sudo cryptsetup status cryptswap1
/dev/mapper/cryptswap1 is active and is in use.
  type:    PLAIN
  cipher:  aes-cbc-essiv:sha256
  keysize: 256 bits
  device:  /dev/sda5
  offset:  0 sectors
  size:    4169728 sectors
  mode:    read/write

Code: Select all

~ $ mount | grep ecryptfs
/home/lingben/.Private on /home/lingben type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=d69affdbead76df7,ecryptfs_fnek_sig=6a5f4e5546f608ce)

Code: Select all

~ $ sudo ls -l /home/.ecryptfs/lingben/.Private
total 316
drwxr--r--  2 lingben lingben  4096 Jul 11 16:45 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp12tqGu7BUAexK0odLm.ES---
-rw-------  1 lingben lingben 12288 Jul 23 01:38 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp2eXxX4vZtIaynEe51sXMtU--
-rw-r--r--  1 lingben lingben 12288 Jul  9 23:24 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp36OpeUL6fs5.6kc4Cl1E4---
drwxr-xr-x 24 lingben lingben  4096 Jul 11 21:15 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp3RhKAByrghRBkb.cVxO7ik--
drwx------ 14 lingben lingben  4096 Jul 23 01:49 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp4bfOtHP9cc9Vr-5JafUCDE--
drwxr-xr-x 25 lingben lingben  4096 Jul 16 03:18 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp6IM9PutQp8iKYNKMp5eJTU--
drwx------  3 lingben lingben  4096 Jul 10 01:05 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp7u8JDHVT0MOJbqz-myEbUU--
drwx------  5 lingben lingben  4096 Jul 15 00:55 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp-8CuLaFTCJH.x.scInKo4E--
drwx------  4 lingben lingben  4096 Jul 10 00:02 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpakeypjyUEbYgFQgCM2EBsk--
drwxr-xr-x  2 lingben lingben  4096 Jul  9 23:30 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpB8ktcS6m9WcVBh.L8Xom7U--
drwxr-xr-x  4 lingben lingben  4096 Jul 15 00:25 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpBfswm9Ho7va-SLqT5dIuFk--
drwxr-xr-x  8 lingben lingben  4096 Jul 10 03:43 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpCzk8r2si.IzZNRAMm6OA1k--
drwxr-xr-x  2 lingben lingben  4096 Jul 20 15:33 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpDe4Vqx2BOBP71KdwhkdJz---
drwxr-xr-x  3 lingben lingben  4096 Jul  9 23:24 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpe3aVJRpDwGbYecrdfQLZ1U--
drwx------  3 lingben lingben  4096 Jul  9 23:30 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpE9ysXZdqnu8nto9mIHe8uk--
drwx------  4 lingben lingben  4096 Jul 23 01:39 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpenfBbMDjAbiofMdbw68B2E--
drwx------  3 lingben lingben  4096 Jul 10 01:10 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp.EnnBC2505F-1xBMMLYAlU--
-rw-r--r--  1 lingben lingben 12288 Jul 13 14:20 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpEzOKig4DmVrXmqAFoCmh6U--
drwxr-xr-x  2 lingben lingben  4096 Jul 13 14:12 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp-F9mjcJlLZZ1vcauf70jYk--
drwxr-xr-x  2 lingben lingben  4096 Jul  9 23:30 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpfgooBDJZfZ62uzbg18ro----
drwx------  3 lingben lingben  4096 Jul 10 01:05 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpHbYQPWvopHYDPsfkPHxfgE--
drwxr-xr-x  2 lingben lingben  4096 Jul 21 00:41 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpI30zyw4JhiT-aD7E3lIp-E--
drwxr-----  2 lingben lingben  4096 Jul 11 16:54 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpibVZtKHyhKtqnay0pFfvik--
-rw-r--r--  1 lingben lingben 12288 Jul  9 23:24 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpi-NlUZ09kZkrx0UMaNwlrk--
drwxr-xr-x  2 lingben lingben  4096 Jul 19 21:34 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpjdIOdzwlWGGahZ.p6HU65U--
-rw-r--r--  1 lingben lingben 12288 Jul  9 23:24 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpJio9ctTUACIeTVR9f7m3b---
drwxr-xr-x  2 lingben lingben  4096 Jul 12 21:01 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpjyE4j-MHVWtM2gzOA3frw---
drwxr-xr-x  2 lingben lingben  4096 Jul 21 00:41 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpjZG2PbCYhKCoBVHnam2oYE--
drwxr-xr-x  2 lingben lingben  4096 Jul  9 23:30 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpka3iV7yUxUEZb-Wrl-5DqU--
drwxr-xr-x  4 lingben lingben  4096 Jul  9 23:31 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpL7NC.dxqBycZxutKM0.ruU--
drwx------  5 lingben lingben  4096 Jul 15 21:04 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVplV4vSgXgi8d9nwBSGinuJ---
lrwxrwxrwx  1 lingben lingben   104 Jul 21 15:00 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpmejWjOzfrvrEXHrl4O-ht--- -> ECRYPTFS_FNEK_ENCRYPTED.FXZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpNFIuyf4h9ng.PLin.skiklvwvDsLhmhdhbnTr675DkU-
-rw-r-----  1 lingben lingben  8192 Jul 22 03:22 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpMeMMS3-bY3FxDw.7cNqxAE--
drwxr-xr-x  2 lingben lingben  4096 Jul  9 23:30 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpNu1BixjB.D7lZ643G5EQf---
-rw-r--r--  1 lingben lingben 16384 Jul 14 00:10 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpOH1oJ-aqAzI-CQIrAmQSlU--
drwxr-xr-x  3 lingben lingben  4096 Jul 13 23:41 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVppUiqsKlUtKXXDAxtzSmAeE--
drwxr-xr-x  2 root  root   4096 Jul 20 13:50 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpQi4k8A7-m1ey1SzqQ-pjfE--
lrwxrwxrwx  1 lingben lingben   104 Jul 21 15:00 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpqtn8C7XrSPXwdGy9SRliIE-- -> ECRYPTFS_FNEK_ENCRYPTED.FXZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp9aFMut26eRFqfdBljQt8idufgTfWL-n.bdHl80Xbvls-
-rw-r--r--  1 lingben lingben 12288 Jul 14 00:10 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpR6aQlKhSS-cVdgIEWHycqE--
-rw-------  1 lingben lingben 12288 Jul 23 01:38 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpSO5wU6TCHEI97VleyEAJI---
-rw-r--r--  1 lingben lingben 16384 Jul 10 04:16 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpT0jgTicspNb83XALPhNyzE--
-rw-------  1 lingben lingben 16384 Jul 22 03:22 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpu61KGH4xYInt4h8EVvJbgU--
-rw-r--r--  1 lingben lingben 12288 Jul  9 23:24 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpuxQhZjPXtr1d.09Pj21zqU--
-rw-------  1 lingben lingben 12288 Jul 23 01:38 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpvCCswbWwK8PzfYnInREQSk--
drwx------  2 lingben lingben  4096 Jul 15 21:05 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpxbN97iuevv9Qah251YLXcU--
drwxr-xr-x  4 lingben lingben  4096 Jul 10 00:12 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpxgczWuPgLW19kseA.h3FQ---
drwx------  2 lingben lingben  4096 Jul 10 00:12 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpXvTJ1VAN91wFwpgvd37AGk--
-rw-r--r--  1 lingben lingben 16384 Jul 23 01:51 ECRYPTFS_FNEK_ENCRYPTED.FXZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVpJ-rbMqpTgbJIoHdxuqsNF6v6v7cB713feGX9TZJORFs-
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: After /home encryption, unable to login

Post by Laurent85 »

sudo swapon -s
[sudo] password for lingben:
Filename Type Size Used Priority
/dev/mapper/cryptswap1 partition 2084860 0 -1
Swap id's currently active.
- /dev/mapper/cryptswap1 : name of device
- type partition (could also be a file)
- size, used, priority : first two self explanatory, priority is used when more than 1 swap is configured.
Using this command you can see all active swap.
sudo cryptsetup status cryptswap1
/dev/mapper/cryptswap1 is active and is in use.
type: PLAIN
cipher: aes-cbc-essiv:sha256
keysize: 256 bits
device: /dev/sda5
offset: 0 sectors
size: 4169728 sectors
mode: read/write
Cryptsetup is the program used to setup encrypted swap device. Using status command shows the setup details.
- device: /dev/sda5 is the physical drive partition used for setting up logical /dev/mapper/cryptswap1 device.
- cipher: aes-cbc-essiv:sha256 is the algorithm and bloc mode used to encrypt data
- keysize: 256 bits is the size of the key
When the system reads/writes to the swap, it actually reads/writes to /dev/sda5 through an encryption layer. Trying to read /dev/sda5 after computer shutdown, data on disk looks like garbage.
mount | grep ecryptfs
/home/lingben/.Private on /home/lingben type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=d69affdbead76df7,ecryptfs_fnek_sig=6a5f4e5546f608ce)
This command shows which ecryptfs filesystem is currently mounted and active
- /home/lingben/.Private or /home/.ecryptfs/lingben/.Private points to same location on drive. That is where your data is stored encrypted.
- /home/lingben is your home directory where all your data is normally stored. Using ecryptfs your home directory remains empty. You need to unlock your data for ecryptfs to mount your home directory to the right location. Ecryptfs is acting as an encryption layer, when the system reads/writes to your home directory /home/lingben, it actually reads/writes to physical location /home/.ecryptfs/lingben/.Private.
sudo ls -l /home/.ecryptfs/lingben/.Private
total 316
drwxr--r-- 2 lingben lingben 4096 Jul 11 16:45 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp12tqGu7BUAexK0odLm.ES---
-rw------- 1 lingben lingben 12288 Jul 23 01:38 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp2eXxX4vZtIaynEe51sXMtU--
-rw-r--r-- 1 lingben lingben 12288 Jul 9 23:24 ECRYPTFS_FNEK_ENCRYPTED.FWZeLotJFjM6nUTmA0MRBLe7p3olaYU2rlVp36OpeUL6fs5.6kc4Cl1E4---
Ecryptfs is using the backing filesystem for storing its encrypted data. Looks like regular files and directories, but real file names and real data are encrypted and useless. Here you can see some limitations of ecryptfs, you have access to some informations in clear text : permissions, size, date.
Image
Locked

Return to “Beginner Questions”