ALMA-09-040390 - AlmaLinux OS 9 must enable the Pluggable Authentication Module (PAM) interface for SSHD.

Information

When UsePAM is set to "yes", PAM runs through account and session types properly. This is important when restricted access to services based off of IP, time, or other factors of the account is needed.

Additionally, this ensures users can inherit certain environment variables on login or disallow access to the server.

Solution

Configure the SSH daemon to use PAM.

Add the following line to "/etc/ssh/sshd_config", or uncomment the line and set the value to "yes":

UsePAM yes

Alternatively, add the setting to an include file if the line "Include /etc/ssh/sshd_config.d/*.conf" is found at the top of the "/etc/ssh/sshd_config" file:

$ cat << EOF | tee /etc/ssh/sshd_config.d/pam.conf
UsePAM yes
EOF

Restart the SSH daemon for the settings to take effect:

$ systemctl restart sshd.service

See Also

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

Item Details

Category: MAINTENANCE

References: 800-53|MA-4c., CAT|I, CCI|CCI-000877, Rule-ID|SV-269420r1050303_rule, STIG-ID|ALMA-09-040390, Vuln-ID|V-269420

Plugin: Unix

Control ID: 029ebc8889cc8fd679f4032555f6813e60e2beb500396c658d7b59b600d0de6d