update-motd - dynamic MOTD generation
/etc/update-motd.d/*
UNIX/Linux system administrators often communicate important
information to console and remote users by maintaining text in the file
/etc/motd
, which is displayed by the
pam_motd(8) module on interactive shell logins.
Traditionally, this file is static text, typically installed by the distribution and only updated on release upgrades, or overwritten by the local administrator with pertinent information.
Ubuntu introduced the update-motd framework, by which the motd(5) is dynamically assembled from a collection of scripts at login.
Executable scripts in /etc/update-motd.d/*
are executed by
pam_motd(8) as the root user at each login, and this
information is concatenated in /run/motd.dynamic
. The order of
script execution is determined by the run-parts(8)
--lsbsysinit option (basically alphabetical order, with a few
caveats).
On Ubuntu systems, /etc/motd
is typically a symbolic link to
/run/motd.dynamic
.