{
    "content": [
        {
            "type": "text",
            "text": "# PAM_LASTLOG (man)\n\n## NAME\n\npamlastlog - PAM module to display date of last login and perform inactive account lock out\n\n## SYNOPSIS\n\npamlastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm] [nowtmp] [noupdate]\n[showfailed] [inactive=<days>] [unlimited]\n\n## DESCRIPTION\n\npamlastlog is a PAM module to display a line of information about the last login of the\nuser. In addition, the module maintains the /var/log/lastlog file.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (11 subsections)\n- **MODULE TYPES PROVIDED**\n- **RETURN VALUES**\n- **EXAMPLES**\n- **FILES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "PAM_LASTLOG",
        "section": "",
        "mode": "man",
        "summary": "pamlastlog - PAM module to display date of last login and perform inactive account lock out",
        "synopsis": "pamlastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm] [nowtmp] [noupdate]\n[showfailed] [inactive=<days>] [unlimited]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Add the following line to /etc/pam.d/login to display the last login time of an user:",
            "session  required  pamlastlog.so nowtmp",
            "To reject the user if he did not login during the previous 50 days the following line can be",
            "used:",
            "auth  required  pamlastlog.so inactive=50"
        ],
        "see_also": [
            {
                "name": "limits.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/limits.conf/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": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "debug",
                        "lines": 2
                    },
                    {
                        "name": "silent",
                        "lines": 3
                    },
                    {
                        "name": "never",
                        "lines": 3
                    },
                    {
                        "name": "nodate",
                        "lines": 2
                    },
                    {
                        "name": "noterm",
                        "lines": 2
                    },
                    {
                        "name": "nohost",
                        "lines": 2
                    },
                    {
                        "name": "nowtmp",
                        "lines": 2
                    },
                    {
                        "name": "noupdate",
                        "lines": 2
                    },
                    {
                        "name": "showfailed",
                        "lines": 3
                    },
                    {
                        "name": "inactive=<days>",
                        "lines": 4
                    },
                    {
                        "name": "unlimited",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "MODULE TYPES PROVIDED",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamlastlog - PAM module to display date of last login and perform inactive account lock out\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pamlastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm] [nowtmp] [noupdate]\n[showfailed] [inactive=<days>] [unlimited]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pamlastlog is a PAM module to display a line of information about the last login of the\nuser. In addition, the module maintains the /var/log/lastlog file.\n\nSome applications may perform this function themselves. In such cases, this module is not\nnecessary.\n\nThe module checks LASTLOGUIDMAX option in /etc/login.defs and does not update or display\nlast login records for users with UID higher than its value. If the option is not present or\nits value is invalid, no user ID limit is applied.\n\nIf the module is called in the auth or account phase, the accounts that were not used\nrecently enough will be disallowed to log in. The check is not performed for the root account\nso the root is never locked out. It is also not performed for users with UID higher than the\nLASTLOGUIDMAX value.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "debug",
                        "content": "Print debug information.\n"
                    },
                    {
                        "name": "silent",
                        "content": "Don't inform the user about any previous login, just update the /var/log/lastlog file.\nThis option does not affect display of bad login attempts.\n"
                    },
                    {
                        "name": "never",
                        "content": "If the /var/log/lastlog file does not contain any old entries for the user, indicate that\nthe user has never previously logged in with a welcome message.\n"
                    },
                    {
                        "name": "nodate",
                        "content": "Don't display the date of the last login.\n"
                    },
                    {
                        "name": "noterm",
                        "content": "Don't display the terminal name on which the last login was attempted.\n"
                    },
                    {
                        "name": "nohost",
                        "content": "Don't indicate from which host the last login was attempted.\n"
                    },
                    {
                        "name": "nowtmp",
                        "content": "Don't update the wtmp entry.\n"
                    },
                    {
                        "name": "noupdate",
                        "content": "Don't update any file.\n"
                    },
                    {
                        "name": "showfailed",
                        "content": "Display number of failed login attempts and the date of the last failed attempt from\nbtmp. The date is not displayed when nodate is specified.\n"
                    },
                    {
                        "name": "inactive=<days>",
                        "content": "This option is specific for the auth or account phase. It specifies the number of days\nafter the last login of the user when the user will be locked out by the module. The\ndefault value is 90.\n"
                    },
                    {
                        "name": "unlimited",
                        "content": "If the fsize limit is set, this option can be used to override it, preventing failures on\nsystems with large UID values that lead lastlog to become a huge sparse file.\n"
                    }
                ]
            },
            "MODULE TYPES PROVIDED": {
                "content": "The auth and account module type allows one to lock out users who did not login recently\nenough. The session module type is provided for displaying the information about the last\nlogin and/or updating the lastlog and wtmp files.\n",
                "subsections": []
            },
            "RETURN VALUES": {
                "content": "PAMSUCCESS\nEverything was successful.\n\nPAMSERVICEERR\nInternal service module error.\n\nPAMUSERUNKNOWN\nUser not known.\n\nPAMAUTHERR\nUser locked out in the auth or account phase due to inactivity.\n\nPAMIGNORE\nThere was an error during reading the lastlog file in the auth or account phase and thus\ninactivity of the user cannot be determined.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Add the following line to /etc/pam.d/login to display the last login time of an user:\n\nsession  required  pamlastlog.so nowtmp\n\n\nTo reject the user if he did not login during the previous 50 days the following line can be\nused:\n\nauth  required  pamlastlog.so inactive=50\n\n",
                "subsections": []
            },
            "FILES": {
                "content": "/var/log/lastlog\nLastlog logging file\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "limits.conf(5), pam.conf(5), pam.d(5), pam(7)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "pamlastlog was written by Andrew G. Morgan <morgan@kernel.org>.\n\nInactive account lock out added by Tomáš Mráz <tm@t8m.info>.\n\n\n\nLinux-PAM Manual                             06/08/2020                               PAMLASTLOG(8)",
                "subsections": []
            }
        }
    }
}