Ubuntu 22.04 LTS must allow the use of a temporary password for system logons with an immediate change to a permanent password.

STIG ID: UBTU-22-411020  |  SRG: SRG-OS-000380-GPOS-00165 |  Severity: medium |  CCI: CCI-002041 |  Vulnerability Id: V-260544 | 

Vulnerability Discussion

Without providing this capability, an account may be created without a password. Nonrepudiation cannot be guaranteed once an account is created if a user is not forced to change the temporary password upon initial logon.

Temporary passwords are typically used to allow access when new accounts are created or passwords are changed. It is common practice for administrators to create temporary passwords for user accounts, which allow the users to log on, yet force them to change the password once they have successfully authenticated.

Check

Verify a policy exists that ensures when a user account is created, it is created using a method that forces a user to change their password upon their next login.

If a policy does not exist, this is a finding.

Fix

Create a policy that ensures when a user is created, it is created using a method that forces a user to change their password upon their next login.

Below are two examples of how to create a user account that requires the user to change their password upon their next login.

$ sudo chage -d 0

OR

$ sudo passwd -e