Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
67
rated 0 times [  67] [ 0]  / answers: 1 / hits: 77215  / 2 Years ago, sun, october 23, 2022, 10:08:55

I was wondering how /etc/motd is automatically updated (I'm on Ubuntu 10.04, server edition). I found the update-motd manpage via a web search, but that program is not installed on my machine. The /etc/motd file is regularly updated, however. I just don't know how and how often. When doing a locate motd, following files are listed:



/etc/motd
/etc/update-motd.d
/etc/update-motd.d/00-header
/etc/update-motd.d/10-help-text
/etc/update-motd.d/20-cpu-checker
/etc/update-motd.d/50-landscape-sysinfo
/etc/update-motd.d/90-updates-available
/etc/update-motd.d/91-release-upgrade
/etc/update-motd.d/98-reboot-required
/etc/update-motd.d/99-footer
/home/me/.cache/motd.legal-displayed
/lib/security/pam_motd.so
/usr/bin/motd+shell
/usr/lib/update-manager/release-upgrade-motd
/usr/lib/update-notifier/update-motd-cpu-checker
/usr/lib/update-notifier/update-motd-reboot-required
/usr/lib/update-notifier/update-motd-updates-available
/usr/share/base-files/motd.md5sums
/usr/share/man/man1/motd+shell.1.gz
/usr/share/man/man5/motd.5.gz
/usr/share/man/man5/motd.tail.5.gz
/usr/share/man/man5/update-motd.5.gz
/usr/share/man/man8/pam_motd.8.gz
/usr/share/ubuntu-serverguide/html/C/pam_motd.html

More From » server

 Answers
5

It's updated by pam_motd on login. The update-motd manual page describes this:



   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
/var/run/motd. 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
/var/run/motd.

[#40280] Monday, October 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rieency

Total Points: 299
Total Questions: 116
Total Answers: 111

Location: Wales
Member since Tue, Dec 14, 2021
2 Years ago
rieency questions
Wed, Aug 25, 21, 15:17, 3 Years ago
Wed, Jun 23, 21, 04:37, 3 Years ago
Fri, Sep 30, 22, 12:07, 2 Years ago
Thu, Feb 24, 22, 00:50, 2 Years ago
Mon, Mar 28, 22, 13:28, 2 Years ago
;