Saya bertanya-tanya bagaimana /etc/motd diperbarui secara otomatis (saya menggunakan Ubuntu 10.04, edisi server). Saya menemukan halaman manual update-motd melalui pencarian web, tetapi program itu tidak diinstal pada mesin saya. Namun, file /etc/motd diperbarui secara berkala. Saya hanya tidak tahu bagaimana dan seberapa sering. Saat melakukan locate motd
, file berikut terdaftar:
/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
Jawaban Terbaik
Ini diperbarui oleh pam_motd
saat masuk. Halaman manual update-motd menjelaskan hal ini:
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.
Kesalahan Nouveau:Chipset Tidak Dikenal Selama Startup Ubuntu 14.04?
Python3 Tidak Mendukung Modul Gtk?