{
    "content": [
        {
            "type": "text",
            "text": "# PAM_NOLOGIN (man)\n\n## NAME\n\npamnologin - Prevent non-root users from login\n\n## SYNOPSIS\n\npamnologin.so [file=/path/nologin] [successok]\n\n## DESCRIPTION\n\npamnologin is a PAM module that prevents users from logging into the system when\n/var/run/nologin or /etc/nologin exists. The contents of the file are displayed to the user.\nThe pamnologin module has no effect on the root user's ability to log in.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (1 subsections)\n- **MODULE TYPES PROVIDED**\n- **RETURN VALUES**\n- **EXAMPLES**\n- **NOTES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "PAM_NOLOGIN",
        "section": "",
        "mode": "man",
        "summary": "pamnologin - Prevent non-root users from login",
        "synopsis": "pamnologin.so [file=/path/nologin] [successok]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "The suggested usage for /etc/pam.d/login is:",
            "auth  required  pamnologin.so"
        ],
        "see_also": [
            {
                "name": "nologin",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/nologin/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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "successok",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "MODULE TYPES PROVIDED",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamnologin - Prevent non-root users from login\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pamnologin.so [file=/path/nologin] [successok]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pamnologin is a PAM module that prevents users from logging into the system when\n/var/run/nologin or /etc/nologin exists. The contents of the file are displayed to the user.\nThe pamnologin module has no effect on the root user's ability to log in.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "file=/path/nologin\nUse this file instead the default /var/run/nologin or /etc/nologin.\n",
                "subsections": [
                    {
                        "name": "successok",
                        "content": "Return PAMSUCCESS if no file exists, the default is PAMIGNORE.\n"
                    }
                ]
            },
            "MODULE TYPES PROVIDED": {
                "content": "The auth and account module types are provided.\n",
                "subsections": []
            },
            "RETURN VALUES": {
                "content": "PAMAUTHERR\nThe user is not root and /etc/nologin exists, so the user is not permitted to log in.\n\nPAMBUFERR\nMemory buffer error.\n\nPAMIGNORE\nThis is the default return value.\n\nPAMSUCCESS\nSuccess: either the user is root or the nologin file does not exist.\n\nPAMUSERUNKNOWN\nUser not known to the underlying authentication module.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "The suggested usage for /etc/pam.d/login is:\n\nauth  required  pamnologin.so\n\n\n",
                "subsections": []
            },
            "NOTES": {
                "content": "In order to make this module effective, all login methods should be secured by it. It should\nbe used as a required method listed before any sufficient methods in order to get standard\nUnix nologin semantics. Note, the use of successok module argument causes the module to\nreturn PAMSUCCESS and as such would break such a configuration - failing sufficient modules\nwould lead to a successful login because the nologin module succeeded.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "nologin(5), pam.conf(5), pam.d(5), pam(7)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "pamnologin was written by Michael K. Johnson <johnsonm@redhat.com>.\n\n\n\nLinux-PAM Manual                             06/08/2020                               PAMNOLOGIN(8)",
                "subsections": []
            }
        }
    }
}