Ubuntu 22.04 LTS must disable account identifiers (individuals, groups, roles, and devices) after 35 days of inactivity.

STIG ID: UBTU-22-411035  |  SRG: SRG-OS-000118-GPOS-00060 |  Severity: medium |  CCI: CCI-003627,CCI-003628 |  Vulnerability Id: V-260547 | 

Vulnerability Discussion

Inactive identifiers pose a risk to systems and applications because attackers may exploit an inactive identifier and potentially obtain undetected access to the system. Owners of inactive accounts will not notice if unauthorized access to their user account has been obtained.

Operating systems need to track periods of inactivity and disable application identifiers after 35 days of inactivity.

Check

Verify the account identifiers (individuals, groups, roles, and devices) are disabled after 35 days of inactivity by using the following command:

Check the account inactivity value by performing the following command:

$ grep INACTIVE /etc/default/useradd
INACTIVE=35

If "INACTIVE" is set to "-1" or is not set to "35", is commented out, or is missing, this is a finding.

Fix

Configure Ubuntu 22.04 LTS to disable account identifiers after 35 days of inactivity after the password expiration.

Run the following command to change the configuration for adduser:

$ sudo useradd -D -f 35

Note: DOD recommendation is 35 days, but a lower value is acceptable. The value "0" will disable the account immediately after the password expires.