Skip to Content
Mastering Linux Security and Hardening
book

Mastering Linux Security and Hardening

by Donald A. Tevault
January 2018
Intermediate to advanced
376 pages
8h 45m
English
Packt Publishing
Content preview from Mastering Linux Security and Hardening

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

Change it to:

        DIR_MODE=0700

Save the file and exit the text editor.

  1. Install the ecryptfs-utils package:
        sudo apt install ecryptfs-utils
  1. Create a user account with 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 - cleopatra         ecryptfs-unwrap-passphrase         exit

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Security and Hardening, The Practical Security Guide

Linux Security and Hardening, The Practical Security Guide

Jason Cannon
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781788620307Other