README 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. pam_lastlog — PAM module to display date of last login and perform inactive
  2. account lock out
  3. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  4. DESCRIPTION
  5. pam_lastlog is a PAM module to display a line of information about the last
  6. login of the user. In addition, the module maintains the /var/log/lastlog file.
  7. Some applications may perform this function themselves. In such cases, this
  8. module is not necessary.
  9. The module checks LASTLOG_UID_MAX option in /etc/login.defs and does not update
  10. or display last login records for users with UID higher than its value. If the
  11. option is not present or its value is invalid, no user ID limit is applied.
  12. If the module is called in the auth or account phase, the accounts that were
  13. not used recently enough will be disallowed to log in. The check is not
  14. performed for the root account so the root is never locked out. It is also not
  15. performed for users with UID higher than the LASTLOG_UID_MAX value.
  16. OPTIONS
  17. debug
  18. Print debug information.
  19. silent
  20. Don't inform the user about any previous login, just update the /var/log/
  21. lastlog file. This option does not affect display of bad login attempts.
  22. never
  23. If the /var/log/lastlog file does not contain any old entries for the user,
  24. indicate that the user has never previously logged in with a welcome
  25. message.
  26. nodate
  27. Don't display the date of the last login.
  28. noterm
  29. Don't display the terminal name on which the last login was attempted.
  30. nohost
  31. Don't indicate from which host the last login was attempted.
  32. nowtmp
  33. Don't update the wtmp entry.
  34. noupdate
  35. Don't update any file.
  36. showfailed
  37. Display number of failed login attempts and the date of the last failed
  38. attempt from btmp. The date is not displayed when nodate is specified.
  39. inactive=<days>
  40. This option is specific for the auth or account phase. It specifies the
  41. number of days after the last login of the user when the user will be
  42. locked out by the module. The default value is 90.
  43. unlimited
  44. If the fsize limit is set, this option can be used to override it,
  45. preventing failures on systems with large UID values that lead lastlog to
  46. become a huge sparse file.
  47. EXAMPLES
  48. Add the following line to /etc/pam.d/login to display the last login time of a
  49. user:
  50. session required pam_lastlog.so nowtmp
  51. To reject the user if he did not login during the previous 50 days the
  52. following line can be used:
  53. auth required pam_lastlog.so inactive=50
  54. AUTHOR
  55. pam_lastlog was written by Andrew G. Morgan <morgan@kernel.org>.
  56. Inactive account lock out added by Tomáš Mráz <tm@t8m.info>.