Je me demandais comment /etc/motd est automatiquement mis à jour (je suis sur Ubuntu 10.04, édition serveur). J'ai trouvé la page de manuel update-motd via une recherche sur le Web, mais ce programme n'est pas installé sur ma machine. Le fichier /etc/motd est cependant régulièrement mis à jour. Je ne sais juste pas comment et à quelle fréquence. Lors d'un locate motd
, les fichiers suivants sont répertoriés :
/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
Meilleure réponse
Il est mis à jour par pam_motd
à la connexion. La page de manuel update-motd décrit ceci :
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.