Skip to content

1.7.4 Ensure permissions on /etc/motd are configured

Audit#

Run the following command and verify: Uid and Gid are both 0/root and Access is 644, or the file doesn't exist.

# stat -L /etc/motd
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
 OR
stat: cannot stat '/etc/motd': No such file or directory

Remediation#

Run the following commands to set permissions on /etc/motd :

# chown root:root $(readlink -e /etc/motd)
# chmod u-x,go-wx $(readlink -e /etc/motd)

OR run the following command to remove the /etc/motd file:

# rm /etc/motd

Default Value:

File doesn't exist