### 6.22.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.22.3. MODULE TYPES PROVIDED

Only the `session` module type is provided.

### 6.22.4. RETURN VALUES

PAM_ABORT

  Not all relevant data or options could be obtained.

PAM_BUF_ERR

  Memory buffer error.

PAM_IGNORE

  This is the default return value of this module.

### 6.22.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.22.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>.

Prev | Up | Next
6.21. pam_mkhomedir - create users home directory | Home | 6.23. pam_namespace - setup a private namespace