README 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. pam_motd — Display the motd file
  2. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  3. DESCRIPTION
  4. pam_motd is a PAM module that can be used to display arbitrary motd (message of
  5. the day) files after a successful login. By default, pam_motd shows files in
  6. the following locations:
  7. /etc/motd
  8. /run/motd
  9. /usr/lib/motd
  10. /etc/motd.d/
  11. /run/motd.d/
  12. /usr/lib/motd.d/
  13. Each message size is limited to 64KB.
  14. If /etc/motd does not exist, then /run/motd is shown. If /run/motd does not
  15. exist, then /usr/lib/motd is shown.
  16. Similar overriding behavior applies to the directories. Files in /etc/motd.d/
  17. override files with the same name in /run/motd.d/ and /usr/lib/motd.d/. Files
  18. in /run/motd.d/ override files with the same name in /usr/lib/motd.d/.
  19. Files in the directories listed above are displayed in lexicographic order by
  20. name. Moreover, the files are filtered by reading them with the credentials of
  21. the target user authenticating on the system.
  22. To silence a message, a symbolic link with target /dev/null may be placed in /
  23. etc/motd.d with the same filename as the message to be silenced. Example:
  24. Creating a symbolic link as follows silences /usr/lib/motd.d/my_motd.
  25. ln -s /dev/null /etc/motd.d/my_motd
  26. The MOTD_SHOWN=pam environment variable is set after showing the motd files,
  27. even when all of them were silenced using symbolic links.
  28. OPTIONS
  29. motd=/path/filename
  30. The /path/filename file is displayed as message of the day. Multiple paths
  31. to try can be specified as a colon-separated list. By default this option
  32. is set to /etc/motd:/run/motd:/usr/lib/motd.
  33. motd_dir=/path/dirname.d
  34. The /path/dirname.d directory is scanned and each file contained inside of
  35. it is displayed. Multiple directories to scan can be specified as a
  36. colon-separated list. By default this option is set to /etc/motd.d:/run/
  37. motd.d:/usr/lib/motd.d.
  38. When no options are given, the default behavior applies for both options.
  39. Specifying either option (or both) will disable the default behavior for both
  40. options.
  41. EXAMPLES
  42. The suggested usage for /etc/pam.d/login is:
  43. session optional pam_motd.so
  44. To use a motd file from a different location:
  45. session optional pam_motd.so motd=/elsewhere/motd
  46. To use a motd file from elsewhere, along with a corresponding .d directory:
  47. session optional pam_motd.so motd=/elsewhere/motd motd_dir=/elsewhere/motd.d
  48. AUTHOR
  49. pam_motd was written by Ben Collins <bcollins@debian.org>.
  50. The motd_dir= option was added by Allison Karlitskaya
  51. <allison.karlitskaya@redhat.com>.