Sign inSign up free

698. A Password Policy for New Accounts

easy 10 XP ~6 minHands-on lab

The new security policy applies to every password set on this server and to every account created from today.

Task

Password strength, in /etc/security/pwquality.conf:

  • at least 12 characters,
  • characters from at least 3 classes (lower case, upper case, digits, symbols),
  • no more than 3 identical characters in a row,
  • rejected if it contains the user name,
  • enforced for root too.

Ageing defaults for new accounts, in /etc/login.defs:

  • a password expires after 180 days,
  • it can be changed again only after 1 day,
  • users are warned 14 days before it expires.

Change only these settings and keep the rest of both files.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Part of Prepare for the LFCS. Next step: Permissions for a Whole Tree

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.