1.6.4 Ensure pam_motd is configured

Information

pam_motd is a PAM module that can be used to display arbitrary MOTD (message of the day) files after a successful login. By default, pam_motd shows files in the following locations:

- /etc/motd
- /run/motd
- /usr/lib/motd
- /etc/motd.d/
- /run/motd.d/
- /usr/lib/motd.d/

If /etc/motd does not exist, then /run/motd is shown. If /run/motd does not exist, then /usr/lib/motd is shown.

Similar overriding behavior applies to the directories. Files in /etc/motd.d/ override files with the same name in /run/motd.d/ and /usr/lib/motd.d/ . Files in /run/motd.d/ override files with the same name
in /usr/lib/motd.d/.

Files in the directories listed above are displayed in lexicographic order by name. Moreover, the files are filtered by reading them with the credentials of the target user authenticating on the system.

Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.

Solution

Edit the MOTD file with the appropriate contents according to your site policy, remove any instances of \m, \r, \s, \v or references to the OS platform

See Also

https://workbench.cisecurity.org/benchmarks/26893

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-8a.

Plugin: Unix

Control ID: 1b8d2fb9d75a9d37f0221f5fd568c5aa807526f85d11e4900092b78b24b4f415