A few days ago, we showed you how to change your home folder in Ubuntu so that only authorized users can see the content in your folder. We have said that the contents of the user directory created by the & ldquo; adduser & rdquo; command are readable to all users. This means that by default, all users with accounts on your machine can browse the content in your home folder. To read the previous article, click here. In that article, we also introduced how to set permissions to allow your home
A few days ago, we showed you how to change your home folder in Ubuntu so that only authorized users can see the content in your folder. We have said that the "adduser" command creates a user directory where the content is readable to all users. This means that by default, all users with accounts on your machine can browse the content in your home folder.
To read the previous article, click here. In that article, we also introduced how to set permissions so that your home folder is not browsed by anyone.
In this blog, we can also see how to achieve the same effect by encrypting the file directory. After the home folder is encrypted, unauthorized users cannot see or access the directory.
The encrypted home folder is not applicable to everyone in every environment. Therefore, before using this function, make sure you really need it.
To use the function of encrypting the home Directory, log on to Ubuntu and run the following command.
Sudo apt-get install ecryptfs-utils
You cannot encrypt the current home folder after logging on. You must create a temporary account and log on to it. Then run the following commands to encrypt your home folder.
Use your current account name to replace the following USERNAME.
Sudo ecryptfs-migrate-home-u USERNAME
After logging on as a temporary user, you need to run it as your own to grant root or admin permissions to your account.Su+ User Name command. The system will prompt you to enter the password.
Su USERNAME
Replace USERNAME with an account with the root or admin permissions.
After that, runEcryptfs-migrate-home-u USERNAMECommand to encrypt the home folder.
After logging on to the encrypted account for the first time, you will see the following interface, including