Hands-on lab for configuring adduser

For this lab, we'll be working with the adduser utility, which is peculiar to Debian/Ubuntu systems:

  1. On your Ubuntu virtual machine, open the /etc/adduser.conf file for editing. Find the line that says DIR_MODE=0755 and change it to DIR_MODE=0700. Save the file and exit the text editor.
  2. Install the ecryptfs-utils package:
sudo apt install ecryptfs-utils
  1. Create a user account with an encrypted home directory for Cleopatra and then view the results:
 sudo adduser --encrypt-home cleopatra ls -l /home
  1. Log in as Cleopatra and run the ecryptfs-unwrap-passphrase command:
su - cleopatraecryptfs-unwrap-passphraseexit

Note that some of the information that adduser asks for is optional, and you can just hit ...

Get Mastering Linux Security and Hardening - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.