{"id":3275,"date":"2022-12-20T17:02:13","date_gmt":"2022-12-20T20:02:13","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/pam_lastlog-man8\/"},"modified":"2022-12-20T17:02:13","modified_gmt":"2022-12-20T20:02:13","slug":"pam_lastlog-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/pam_lastlog-man8\/","title":{"rendered":"PAM_LASTLOG (man8)"},"content":{"rendered":"<h1 align=\"center\">PAM_LASTLOG<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#MODULE TYPES PROVIDED\">MODULE TYPES PROVIDED<\/a><br \/> <a href=\"#RETURN VALUES\">RETURN VALUES<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pam_lastlog \u2212 PAM module to display date of last login and perform inactive account lock out<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"89%\">\n<p style=\"margin-top: 1em\"><b>pam_lastlog.so<\/b> [debug] [silent] [never] [nodate] [nohost] [noterm] [nowtmp] [noupdate] [showfailed] [inactive=<days>] [unlimited]<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pam_lastlog is a PAM module to display a line of information about the last login of the user. In addition, the module maintains the \/var\/log\/lastlog file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Some applications may perform this function themselves. In such cases, this module is not necessary.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the module is called in the auth or account phase, the accounts that were not used recently enough will be disallowed to log in. The check is not performed for the root account so the root is never locked out.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>debug<\/b><\/p>\n<p style=\"margin-left:17%;\">Print debug information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>silent<\/b><\/p>\n<p style=\"margin-left:17%;\">Don&#8217;t inform the user about any previous login, just update the \/var\/log\/lastlog file. This option does not affect display of bad login attempts.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>never<\/b><\/p>\n<p style=\"margin-left:17%;\">If the \/var\/log\/lastlog file does not contain any old entries for the user, indicate that the user has never previously logged in with a welcome message.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>nodate<\/b><\/p>\n<p style=\"margin-left:17%;\">Don&#8217;t display the date of the last login.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>noterm<\/b><\/p>\n<p style=\"margin-left:17%;\">Don&#8217;t display the terminal name on which the last login was attempted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>nohost<\/b><\/p>\n<p style=\"margin-left:17%;\">Don&#8217;t indicate from which host the last login was attempted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>nowtmp<\/b><\/p>\n<p style=\"margin-left:17%;\">Don&#8217;t update the wtmp entry.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>noupdate<\/b><\/p>\n<p style=\"margin-left:17%;\">Don&#8217;t update any file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>showfailed<\/b><\/p>\n<p style=\"margin-left:17%;\">Display number of failed login attempts and the date of the last failed attempt from btmp. The date is not displayed when <b>nodate<\/b> is specified.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>inactive=<days><\/b><\/p>\n<p style=\"margin-left:17%;\">This option is specific for the auth or account phase. It specifies the number of days after the last login of the user when the user will be locked out by the module. The default value is 90.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>unlimited<\/b><\/p>\n<p style=\"margin-left:17%;\">If the <i>fsize<\/i> limit is set, this option can be used to override it, preventing failures on systems with large UID values that lead lastlog to become a huge sparse file.<\/p>\n<h2>MODULE TYPES PROVIDED <a name=\"MODULE TYPES PROVIDED\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>auth<\/b> and <b>account<\/b> module type allows to lock out users which did not login recently enough. The <b>session<\/b> module type is provided for displaying the information about the last login and\/or updating the lastlog and wtmp files.<\/p>\n<h2>RETURN VALUES <a name=\"RETURN VALUES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_SUCCESS<\/p>\n<p style=\"margin-left:17%;\">Everything was successful.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_SERVICE_ERR<\/p>\n<p style=\"margin-left:17%;\">Internal service module error.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_USER_UNKNOWN<\/p>\n<p style=\"margin-left:17%;\">User not known.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_AUTH_ERR<\/p>\n<p style=\"margin-left:17%;\">User locked out in the auth or account phase due to inactivity.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">PAM_IGNORE<\/p>\n<p style=\"margin-left:17%;\">There was an error during reading the lastlog file in the auth or account phase and thus inactivity of the user cannot be determined.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Add the following line to \/etc\/pam.d\/login to display the last login time of an user:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">session required pam_lastlog.so nowtmp<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To reject the user if he did not login during the previous 50 days the following line can be used:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">auth required pam_lastlog.so inactive=50<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\/var\/log\/lastlog<\/p>\n<p style=\"margin-left:17%;\">Lastlog logging file<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>limits.conf<\/b>(5), <b>pam.conf<\/b>(5), <b>pam.d<\/b>(5), <b>pam<\/b>(8)<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pam_lastlog was written by Andrew G. Morgan <morgan@kernel.org>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Inactive account lock out added by Tom\u00c3\u00a1\u00c5\u00a1 Mr\u00c3\u00a1z <tm@t8m.info>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  pam_lastlog \u2212 PAM module to display date of last login and perform inactive account lock out <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,408],"class_list":["post-3275","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-pam_lastlog"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3275"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3275\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}