pam_localuser.8 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. '\" t
  2. .\" Title: pam_localuser
  3. .\" Author: [see the "AUTHOR" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "PAM_LOCALUSER" "8" "09/03/2021" "Linux-PAM Manual" "Linux\-PAM Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. pam_localuser \- require users to be listed in /etc/passwd
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBpam_localuser\&.so\fR\ 'u
  34. \fBpam_localuser\&.so\fR [debug] [file=\fI/path/passwd\fR]
  35. .SH "DESCRIPTION"
  36. .PP
  37. pam_localuser is a PAM module to help implementing site\-wide login policies, where they typically include a subset of the network\*(Aqs users and a few accounts that are local to a particular workstation\&. Using pam_localuser and pam_wheel or pam_listfile is an effective way to restrict access to either local users and/or a subset of the network\*(Aqs users\&.
  38. .PP
  39. This could also be implemented using pam_listfile\&.so and a very short awk script invoked by cron, but it\*(Aqs common enough to have been separated out\&.
  40. .SH "OPTIONS"
  41. .PP
  42. .PP
  43. \fBdebug\fR
  44. .RS 4
  45. Print debug information\&.
  46. .RE
  47. .PP
  48. \fBfile=\fR\fB\fI/path/passwd\fR\fR
  49. .RS 4
  50. Use a file other than
  51. /etc/passwd\&.
  52. .RE
  53. .SH "MODULE TYPES PROVIDED"
  54. .PP
  55. All module types (\fBaccount\fR,
  56. \fBauth\fR,
  57. \fBpassword\fR
  58. and
  59. \fBsession\fR) are provided\&.
  60. .SH "RETURN VALUES"
  61. .PP
  62. .PP
  63. PAM_SUCCESS
  64. .RS 4
  65. The new localuser was set successfully\&.
  66. .RE
  67. .PP
  68. PAM_BUF_ERR
  69. .RS 4
  70. Memory buffer error\&.
  71. .RE
  72. .PP
  73. PAM_CONV_ERR
  74. .RS 4
  75. The conversation method supplied by the application failed to obtain the username\&.
  76. .RE
  77. .PP
  78. PAM_INCOMPLETE
  79. .RS 4
  80. The conversation method supplied by the application returned PAM_CONV_AGAIN\&.
  81. .RE
  82. .PP
  83. PAM_SERVICE_ERR
  84. .RS 4
  85. The user name is not valid or the passwd file is unavailable\&.
  86. .RE
  87. .PP
  88. PAM_PERM_DENIED
  89. .RS 4
  90. The user is not listed in the passwd file\&.
  91. .RE
  92. .SH "EXAMPLES"
  93. .PP
  94. Add the following lines to
  95. /etc/pam\&.d/su
  96. to allow only local users or group wheel to use su\&.
  97. .sp
  98. .if n \{\
  99. .RS 4
  100. .\}
  101. .nf
  102. account sufficient pam_localuser\&.so
  103. account required pam_wheel\&.so
  104. .fi
  105. .if n \{\
  106. .RE
  107. .\}
  108. .sp
  109. .SH "FILES"
  110. .PP
  111. /etc/passwd
  112. .RS 4
  113. Local user account information\&.
  114. .RE
  115. .SH "SEE ALSO"
  116. .PP
  117. \fBpam.conf\fR(5),
  118. \fBpam.d\fR(5),
  119. \fBpam\fR(8)
  120. .SH "AUTHOR"
  121. .PP
  122. pam_localuser was written by Nalin Dahyabhai <nalin@redhat\&.com>\&.