/usr/share/doc/pam/html
NameSizeModeActions
Linux-PAM_SAG.html91960644editdlrm
sag-author.html31110644editdlrm
sag-configuration-directory.html29660644editdlrm
sag-configuration-example.html55220644editdlrm
sag-configuration-file.html175190644editdlrm
sag-configuration.html30650644editdlrm
sag-copyright.html36170644editdlrm
sag-introduction.html44460644editdlrm
sag-module-reference.html381520644editdlrm
sag-overview.html79950644editdlrm
sag-pam_access.html181200644editdlrm
sag-pam_cracklib.html202710644editdlrm
sag-pam_debug.html80870644editdlrm
sag-pam_deny.html47040644editdlrm
sag-pam_echo.html57520644editdlrm
sag-pam_env.html127960644editdlrm
sag-pam_exec.html83710644editdlrm
sag-pam_faildelay.html45900644editdlrm
sag-pam_filter.html93420644editdlrm
sag-pam_ftp.html62030644editdlrm
sag-pam_group.html101360644editdlrm
sag-pam_issue.html63780644editdlrm
sag-pam_keyinit.html70150644editdlrm
sag-pam_lastlog.html85240644editdlrm
sag-pam_limits.html181140644editdlrm
sag-pam_listfile.html105340644editdlrm
sag-pam_localuser.html54460644editdlrm
sag-pam_loginuid.html52090644editdlrm
sag-pam_mail.html77620644editdlrm
sag-pam_mkhomedir.html61960644editdlrm
sag-pam_motd.html77530644editdlrm
sag-pam_namespace.html206400644editdlrm
sag-pam_nologin.html53320644editdlrm
sag-pam_permit.html43040644editdlrm
sag-pam_pwhistory.html84760644editdlrm
sag-pam_rhosts.html64040644editdlrm
sag-pam_rootok.html51090644editdlrm
sag-pam_securetty.html64800644editdlrm
sag-pam_selinux.html83130644editdlrm
sag-pam_shells.html42610644editdlrm
sag-pam_succeed_if.html91540644editdlrm
sag-pam_time.html97250644editdlrm
sag-pam_timestamp.html68890644editdlrm
sag-pam_umask.html63180644editdlrm
sag-pam_unix.html150560644editdlrm
sag-pam_userdb.html85850644editdlrm
sag-pam_warn.html45690644editdlrm
sag-pam_wheel.html71810644editdlrm
sag-pam_xauth.html84200644editdlrm
sag-security-issues-other.html29930644editdlrm
sag-security-issues-wrong.html29630644editdlrm
sag-security-issues.html21610644editdlrm
sag-see-also.html22830644editdlrm
sag-text-conventions.html31870644editdlrm
Edit: /usr/share/doc/pam/html/sag-pam_motd.html (7753B)
6.21. pam_motd - display the motd file

6.21. pam_motd - display the motd file

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

6.21.1. DESCRIPTION

pam_motd is a PAM module that can be used to display arbitrary motd (message of the day) files after a successful login. By default, pam_motd shows files in the following locations:

/etc/motd
/run/motd
/usr/lib/motd
/etc/motd.d/
/run/motd.d/
/usr/lib/motd.d/

Each message size is limited to 64KB.

If /etc/motd does not exist, then /run/motd is shown. If /run/motd does not exist, then /usr/lib/motd is shown.

Similar overriding behavior applies to the directories. Files in /etc/motd.d/ override files with the same name in /run/motd.d/ and /usr/lib/motd.d/. Files in /run/motd.d/ override files with the same name in /usr/lib/motd.d/.

Files in the directories listed above are displayed in lexicographic order by name. Moreover, the files are filtered by reading them with the credentials of the target user authenticating on the system.

To silence a message, a symbolic link with target /dev/null may be placed in /etc/motd.d with the same filename as the message to be silenced. Example: Creating a symbolic link as follows silences /usr/lib/motd.d/my_motd.

ln -s /dev/null /etc/motd.d/my_motd

6.21.2. OPTIONS

motd=/path/filename

The /path/filename file is displayed as message of the day. Multiple paths to try can be specified as a colon-separated list. By default this option is set to /etc/motd:/run/motd:/usr/lib/motd.

motd_dir=/path/dirname.d

The /path/dirname.d directory is scanned and each file contained inside of it is displayed. Multiple directories to scan can be specified as a colon-separated list. By default this option is set to /etc/motd.d:/run/motd.d:/usr/lib/motd.d.

When no options are given, the default behavior applies for both options. Specifying either option (or both) will disable the default behavior for both options.

6.21.3. MODULE TYPES PROVIDED

Only the session module type is provided.

6.21.4. RETURN VALUES

PAM_IGNORE

This is the only return value of this module.

6.21.5. EXAMPLES

The suggested usage for /etc/pam.d/login is:

session  optional  pam_motd.so
      

To use a motd file from a different location:

session  optional  pam_motd.so motd=/elsewhere/motd
      

To use a motd file from elsewhere, along with a corresponding .d directory:

session  optional  pam_motd.so motd=/elsewhere/motd motd_dir=/elsewhere/motd.d
      

6.21.6. AUTHOR

pam_motd was written by Ben Collins <bcollins@debian.org>.

The motd_dir= option was added by Allison Karlitskaya <allison.karlitskaya@redhat.com>.