1PAM_MOTD(8)                    Linux-PAM Manual                    PAM_MOTD(8)
2
3
4

NAME

6       pam_motd - Display the motd file
7

SYNOPSIS

9       pam_motd.so [motd=/path/filename] [motd_dir=/path/dirname.d]
10

DESCRIPTION

12       pam_motd is a PAM module that can be used to display arbitrary motd
13       (message of the day) files after a successful login. By default,
14       pam_motd shows files in the following locations:
15
16           /etc/motd
17           /run/motd
18           /usr/lib/motd
19           /etc/motd.d/
20           /run/motd.d/
21           /usr/lib/motd.d/
22
23       Each message size is limited to 64KB.
24
25       If /etc/motd does not exist, then /run/motd is shown. If /run/motd does
26       not exist, then /usr/lib/motd is shown.
27
28       Similar overriding behavior applies to the directories. Files in
29       /etc/motd.d/ override files with the same name in /run/motd.d/ and
30       /usr/lib/motd.d/. Files in /run/motd.d/ override files with the same
31       name in /usr/lib/motd.d/.
32
33       Files the in the directories listed above are displayed in
34       lexicographic order by name.
35
36       To silence a message, a symbolic link with target /dev/null may be
37       placed in /etc/motd.d with the same filename as the message to be
38       silenced. Example: Creating a symbolic link as follows silences
39       /usr/lib/motd.d/my_motd.
40
41       ln -s /dev/null /etc/motd.d/my_motd
42

OPTIONS

44       motd=/path/filename
45           The /path/filename file is displayed as message of the day.
46           Multiple paths to try can be specified as a colon-separated list.
47           By default this option is set to /etc/motd:/run/motd:/usr/lib/motd.
48
49       motd_dir=/path/dirname.d
50           The /path/dirname.d directory is scanned and each file contained
51           inside of it is displayed. Multiple directories to scan can be
52           specified as a colon-separated list. By default this option is set
53           to /etc/motd.d:/run/motd.d:/usr/lib/motd.d.
54
55       When no options are given, the default behavior applies for both
56       options. Specifying either option (or both) will disable the default
57       behavior for both options.
58

MODULE TYPES PROVIDED

60       Only the session module type is provided.
61

RETURN VALUES

63       PAM_IGNORE
64           This is the only return value of this module.
65

EXAMPLES

67       The suggested usage for /etc/pam.d/login is:
68
69           session  optional  pam_motd.so
70
71
72       To use a motd file from a different location:
73
74           session  optional  pam_motd.so motd=/elsewhere/motd
75
76
77       To use a motd file from elsewhere, along with a corresponding .d
78       directory:
79
80           session  optional  pam_motd.so motd=/elsewhere/motd motd_dir=/elsewhere/motd.d
81
82
83

SEE ALSO

85       motd(5), pam.conf(5), pam.d(5), pam(8)
86

AUTHOR

88       pam_motd was written by Ben Collins <bcollins@debian.org>.
89
90       The motd_dir= option was added by Allison Karlitskaya
91       <allison.karlitskaya@redhat.com>.
92
93
94
95Linux-PAM Manual                  03/09/2020                       PAM_MOTD(8)
Impressum