ALMA-09-022130 - All AlmaLinux OS 9 local initialization files must have mode 0740 or less permissive.

Information

Local initialization files are used to configure the user's shell environment upon logon. Malicious modification of these files could compromise accounts upon logon.

World-readable "dot files" such as .bash_history or .netrc can reveal plaintext credentials, such files should be further protected (e.g., 0600).

Solution

Set the mode of the local initialization files to "0740" with the following command:

Note: The example will be for the "testuser" account, who has a home directory of "/home/testuser".

$ chmod 0740 /home/testuser/.<INIT_FILE>

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_CL_AlmaLinux_OS_9_V1R2_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CAT|II, CCI|CCI-000366, Rule-ID|SV-269276r1050158_rule, STIG-ID|ALMA-09-022130, Vuln-ID|V-269276

Plugin: Unix

Control ID: 27aa8a826897006bd6955af157d4b7eb86f3e82f599c8a51e0a11596020cbc7f