pam_wheel.8 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. '\" t
  2. .\" Title: pam_wheel
  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_WHEEL" "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_wheel \- Only permit root access to members of group wheel
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBpam_wheel\&.so\fR\ 'u
  34. \fBpam_wheel\&.so\fR [debug] [deny] [group=\fIname\fR] [root_only] [trust] [use_uid]
  35. .SH "DESCRIPTION"
  36. .PP
  37. The pam_wheel PAM module is used to enforce the so\-called
  38. \fIwheel\fR
  39. group\&. By default it permits access to the target user if the applicant user is a member of the
  40. \fIwheel\fR
  41. group\&. If no group with this name exist, the module is using the group with the group\-ID
  42. \fB0\fR\&.
  43. .SH "OPTIONS"
  44. .PP
  45. \fBdebug\fR
  46. .RS 4
  47. Print debug information\&.
  48. .RE
  49. .PP
  50. \fBdeny\fR
  51. .RS 4
  52. Reverse the sense of the auth operation: if the user is trying to get UID 0 access and is a member of the wheel group (or the group of the
  53. \fBgroup\fR
  54. option), deny access\&. Conversely, if the user is not in the group, return PAM_IGNORE (unless
  55. \fBtrust\fR
  56. was also specified, in which case we return PAM_SUCCESS)\&.
  57. .RE
  58. .PP
  59. \fBgroup=\fR\fB\fIname\fR\fR
  60. .RS 4
  61. Instead of checking the wheel or GID 0 groups, use the
  62. \fB\fIname\fR\fR
  63. group to perform the authentication\&.
  64. .RE
  65. .PP
  66. \fBroot_only\fR
  67. .RS 4
  68. The check for wheel membership is done only when the target user UID is 0\&.
  69. .RE
  70. .PP
  71. \fBtrust\fR
  72. .RS 4
  73. The pam_wheel module will return PAM_SUCCESS instead of PAM_IGNORE if the user is a member of the wheel group (thus with a little play stacking the modules the wheel members may be able to su to root without being prompted for a passwd)\&.
  74. .RE
  75. .PP
  76. \fBuse_uid\fR
  77. .RS 4
  78. The check will be done against the real uid of the calling process, instead of trying to obtain the user from the login session associated with the terminal in use\&.
  79. .RE
  80. .SH "MODULE TYPES PROVIDED"
  81. .PP
  82. The
  83. \fBauth\fR
  84. and
  85. \fBaccount\fR
  86. module types are provided\&.
  87. .SH "RETURN VALUES"
  88. .PP
  89. PAM_AUTH_ERR
  90. .RS 4
  91. Authentication failure\&.
  92. .RE
  93. .PP
  94. PAM_BUF_ERR
  95. .RS 4
  96. Memory buffer error\&.
  97. .RE
  98. .PP
  99. PAM_IGNORE
  100. .RS 4
  101. The return value should be ignored by PAM dispatch\&.
  102. .RE
  103. .PP
  104. PAM_PERM_DENY
  105. .RS 4
  106. Permission denied\&.
  107. .RE
  108. .PP
  109. PAM_SERVICE_ERR
  110. .RS 4
  111. Cannot determine the user name\&.
  112. .RE
  113. .PP
  114. PAM_SUCCESS
  115. .RS 4
  116. Success\&.
  117. .RE
  118. .PP
  119. PAM_USER_UNKNOWN
  120. .RS 4
  121. User not known\&.
  122. .RE
  123. .SH "EXAMPLES"
  124. .PP
  125. The root account gains access by default (rootok), only wheel members can become root (wheel) but Unix authenticate non\-root applicants\&.
  126. .sp
  127. .if n \{\
  128. .RS 4
  129. .\}
  130. .nf
  131. su auth sufficient pam_rootok\&.so
  132. su auth required pam_wheel\&.so
  133. su auth required pam_unix\&.so
  134. .fi
  135. .if n \{\
  136. .RE
  137. .\}
  138. .sp
  139. .SH "SEE ALSO"
  140. .PP
  141. \fBpam.conf\fR(5),
  142. \fBpam.d\fR(5),
  143. \fBpam\fR(8)
  144. .SH "AUTHOR"
  145. .PP
  146. pam_wheel was written by Cristian Gafton <gafton@redhat\&.com>\&.