NixOS emergency or temporary user accounts must be provisioned with an expiration time of 72 hours or less.
An XCCDF Rule
Description
If emergency or temporary user accounts remain active when no longer needed or for an excessive period, these accounts may be used to gain unauthorized access. To mitigate this risk, automated termination of all emergency or temporary accounts must be set upon account creation. Temporary accounts are established as part of normal account activation procedures when there is a need for short-term accounts without the demand for immediacy in account activation. Emergency accounts are privileged accounts that are established in response to crisis situations where the need for rapid account activation is required. Therefore, emergency account activation may bypass normal account authorization processes. If these accounts are automatically disabled, system maintenance during emergencies may not be possible, thus adversely affecting system availability. Emergency accounts are different from infrequently used accounts (i.e., local login accounts used by the organization's system administrators when network or normal login/access is not available). Infrequently used accounts are not subject to automatic termination dates. Emergency accounts are accounts created in response to crisis situations, usually for use by maintenance personnel. The automatic expiration or disabling time period may be extended as needed until the crisis is resolved; however, it must not be extended indefinitely. A permanent account should be established for privileged users who need long-term maintenance accounts. Satisfies: SRG-OS-000002-GPOS-00002, SRG-OS-000123-GPOS-00064
- ID
- SV-268079r1039591_rule
- Version
- ANIX-00-000020
- Severity
- Medium
- References
- Updated
Remediation Templates
A Manual Procedure
Configure the system to terminate emergency or temporary accounts after a 72-hour time period with the following command. Substitute "system_account_name" with the account to be created.
$ sudo chage -E "date -d "+3 days" +%Y-%m-%d" system_account_name