GNU/Linux >> Tutoriels Linux >  >> Ubuntu

Comment /etc/motd est-il mis à jour ?

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.

Ubuntu
  1. Commande grpck – Supprimez les entrées corrompues ou en double dans les fichiers /etc/group et /etc/gshadow.

  2. Quand dois-je utiliser /dev/shm/ et quand dois-je utiliser /tmp/?

  3. Quelle est la connexion entre les répertoires /etc/init.d et /etc/rcX.d sous Linux ?

  4. Les sites Web doivent-ils vivre dans /var/ ou /usr/ selon l'utilisation recommandée ?

  5. Dans mon fichier /etc/hosts/ sous Linux/OSX, comment créer un sous-domaine générique ?

La bonne façon de modifier les fichiers /etc/passwd et /etc/group sous Linux

Comment restaurer /etc/profile ??

CentOS / RHEL 7 :Comment récupérer à partir d'une entrée root supprimée dans les fichiers /etc/shadow et/ou /etc/passwd

Comment récupérer à partir d'une entrée racine supprimée dans les fichiers /etc/shadow et/ou /etc/passwd dans CentOS / RHEL 6

Comment surveiller les modifications des fichiers /etc/shadow et /etc/passwd avec Auditd ?

Comprendre les fichiers /proc/mounts, /etc/mtab et /proc/partitions