GNU/Linux >> Linux の 問題 >  >> Ubuntu

/ etc / motdはどのように更新されますか?

/ etc / motdがどのように自動的に更新されるのか疑問に思いました(私はUbuntu 10.04、サーバー版を使用しています)。 Web検索でupdate-motdのマンページを見つけましたが、そのプログラムが私のマシンにインストールされていません。ただし、/ etc/motdファイルは定期的に更新されます。方法と頻度がわかりません。 locate motdを実行する場合 、次のファイルが一覧表示されます:

/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

ベストアンサー

pam_motdによって更新されます ログイン時。 update-motdのマニュアルページでは、これについて説明しています。

   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. CentOS / RHEL 6 で /etc/shadow および/または /etc/passwd ファイルの削除されたルート エントリから復元する方法

  2. /etc/shadow および /etc/passwd ファイルの変更を Auditd で監視するにはどうすればよいですか?

  3. grpck コマンド – /etc/group および /etc/gshadow ファイル内の破損したエントリまたは重複したエントリを削除します。

  1. /dev/shm/ と /tmp/ はいつ使用する必要がありますか?

  2. etc ディレクトリの chmod を元に戻すにはどうすればよいですか?

  3. /etc/hosts と /etc/resolv.conf の違い

  1. Linuxは複数の連続したパスセパレーター(/ home //// username /// file)をどのように処理しますか?

  2. 〜/ .profile、〜/ .bashrc、〜/ .bash_profile、〜/ .gnomerc、/ etc / bash_bashrc、/ etc / screenrcの違い…?

  3. /etc/issues をセットアップして eth0 の IP アドレスを表示する方法