上QQ阅读APP看书,第一时间看更新
Hands-on lab for configuring adduser
For this lab, we'll be working with the adduser utility, which is peculiar to Debian/Ubuntu systems:
- On your Ubuntu virtual machine, open the /etc/adduser.conf file for editing. Find the line that says:
DIR_MODE=0755
Change it to:
DIR_MODE=0700
Save the file and exit the text editor.
- Install the ecryptfs-utils package:
sudo apt install ecryptfs-utils
- Create a user account with encrypted home directory for Cleopatra and then view the results:
sudo adduser --encrypt-home cleopatra
ls -l /home
- Log in as Cleopatra and run the ecryptfs-unwrap-passphrase command:
su - cleopatra
ecryptfs-unwrap-passphrase
exit
Note that some of the information that adduser asks for is optional, and you can just hit the Enter key for those items.