{
    "content": [
        {
            "type": "text",
            "text": "# pam_motd(8) (man)\n\n**Summary:** pammotd - Display the motd file\n\n**Synopsis:** pammotd.so [motd=/path/filename] [motddir=/path/dirname.d]\n\n## Examples\n\n- `The suggested usage for /etc/pam.d/login is:`\n- `session  optional  pammotd.so`\n- `To use a motd file from a different location:`\n- `session  optional  pammotd.so motd=/elsewhere/motd`\n- `To use a motd file from elsewhere, along with a corresponding .d directory:`\n- `session  optional  pammotd.so motd=/elsewhere/motd motddir=/elsewhere/motd.d`\n\n## See Also\n\n- motd(5)\n- pam.conf(5)\n- pam.d(5)\n- pam(7)\n- update-motd(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (30 lines)\n- **OPTIONS** (10 lines) — 1 subsections\n  - noupdate (5 lines)\n- **MODULE TYPES PROVIDED** (2 lines)\n- **RETURN VALUES** (9 lines)\n- **EXAMPLES** (16 lines)\n- **SEE ALSO** (2 lines)\n- **AUTHOR** (7 lines)\n\n## Full Content\n\n### NAME\n\npammotd - Display the motd file\n\n### SYNOPSIS\n\npammotd.so [motd=/path/filename] [motddir=/path/dirname.d]\n\n### DESCRIPTION\n\npammotd is a PAM module that can be used to display arbitrary motd (message of the day)\nfiles after a successful login. By default, pammotd shows files in the following locations:\n\n/etc/motd\n/run/motd\n/usr/lib/motd\n/etc/motd.d/\n/run/motd.d/\n/usr/lib/motd.d/\n\nEach message size is limited to 64KB.\n\nIf /etc/motd does not exist, then /run/motd is shown. If /run/motd does not exist, then\n/usr/lib/motd is shown.\n\nSimilar overriding behavior applies to the directories. Files in /etc/motd.d/ override files\nwith the same name in /run/motd.d/ and /usr/lib/motd.d/. Files in /run/motd.d/ override files\nwith the same name in /usr/lib/motd.d/.\n\nFiles the in the directories listed above are displayed in lexicographic order by name.\n\nTo silence a message, a symbolic link with target /dev/null may be placed in /etc/motd.d with\nthe same filename as the message to be silenced. Example: Creating a symbolic link as follows\nsilences /usr/lib/motd.d/mymotd.\n\nln -s /dev/null /etc/motd.d/mymotd\n\nThe MOTDSHOWN=pam environment variable is set after showing the motd files, even when all of\nthem were silenced using symbolic links.\n\n### OPTIONS\n\nmotd=/path/filename\nThe /path/filename file is displayed as message of the day. Multiple paths to try can be\nspecified as a colon-separated list. By default this option is set to\n/etc/motd:/run/motd:/usr/lib/motd.\n\nmotddir=/path/dirname.d\nThe /path/dirname.d directory is scanned and each file contained inside of it is\ndisplayed. Multiple directories to scan can be specified as a colon-separated list. By\ndefault this option is set to /etc/motd.d:/run/motd.d:/usr/lib/motd.d.\n\n#### noupdate\n\nDon't run the scripts in /etc/update-motd.d to refresh the motd file.\n\nWhen no options are given, the default behavior applies for both options. Specifying either\noption (or both) will disable the default behavior for both options.\n\n### MODULE TYPES PROVIDED\n\nOnly the session module type is provided.\n\n### RETURN VALUES\n\nPAMABORT\nNot all relevant data or options could be obtained.\n\nPAMBUFERR\nMemory buffer error.\n\nPAMIGNORE\nThis is the default return value of this module.\n\n### EXAMPLES\n\nThe suggested usage for /etc/pam.d/login is:\n\nsession  optional  pammotd.so\n\n\nTo use a motd file from a different location:\n\nsession  optional  pammotd.so motd=/elsewhere/motd\n\n\nTo use a motd file from elsewhere, along with a corresponding .d directory:\n\nsession  optional  pammotd.so motd=/elsewhere/motd motddir=/elsewhere/motd.d\n\n### SEE ALSO\n\nmotd(5), pam.conf(5), pam.d(5), pam(7), update-motd(5)\n\n### AUTHOR\n\npammotd was written by Ben Collins <bcollins@debian.org>.\n\nThe motddir= option was added by Allison Karlitskaya <allison.karlitskaya@redhat.com>.\n\n\n\nLinux-PAM Manual                             06/08/2020                                  PAMMOTD(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "pam_motd",
        "section": "8",
        "mode": "man",
        "summary": "pammotd - Display the motd file",
        "synopsis": "pammotd.so [motd=/path/filename] [motddir=/path/dirname.d]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "The suggested usage for /etc/pam.d/login is:",
            "session  optional  pammotd.so",
            "To use a motd file from a different location:",
            "session  optional  pammotd.so motd=/elsewhere/motd",
            "To use a motd file from elsewhere, along with a corresponding .d directory:",
            "session  optional  pammotd.so motd=/elsewhere/motd motddir=/elsewhere/motd.d"
        ],
        "see_also": [
            {
                "name": "motd",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/motd/5/json"
            },
            {
                "name": "pam.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pam.conf/5/json"
            },
            {
                "name": "pam.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pam.d/5/json"
            },
            {
                "name": "pam",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/pam/7/json"
            },
            {
                "name": "update-motd",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/update-motd/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 10,
                "subsections": [
                    {
                        "name": "noupdate",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "MODULE TYPES PROVIDED",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}