The PAM MOTD module updates the Message-of-the-Day automatically on user logins.
But sometimes, the system administrator may want to update the MOTD immediately or on demand.
This simple program performs the same actions handled by PAM on login, and prints the new MOTD to stdout.
Note that only the system administrator can typically write to the MOTD, and thus this utility should be
executed as the root user.
The program also accepts the --show-only option to not update, just show the MOTD. Regular users can use
this option to see the dynamically generated MOTD even when the root user did not generate it in advance.
The show-motd package contains the /etc/profile.d/update-motd.sh snipped to show MOTD in interactive
shells when the PAM MOTD module did not show it on login.
For best practices and additional information, please see update-motd(5).