pam_sepermit.8 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. '\" t
  2. .\" Title: pam_sepermit
  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_SEPERMIT" "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_sepermit \- PAM module to allow/deny login depending on SELinux enforcement state
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBpam_sepermit\&.so\fR\ 'u
  34. \fBpam_sepermit\&.so\fR [debug] [conf=\fI/path/to/config/file\fR]
  35. .SH "DESCRIPTION"
  36. .PP
  37. The pam_sepermit module allows or denies login depending on SELinux enforcement state\&.
  38. .PP
  39. When the user which is logging in matches an entry in the config file he is allowed access only when the SELinux is in enforcing mode\&. Otherwise he is denied access\&. For users not matching any entry in the config file the pam_sepermit module returns PAM_IGNORE return value\&.
  40. .PP
  41. The config file contains a list of user names one per line with optional arguments\&. If the
  42. \fIname\fR
  43. is prefixed with
  44. \fI@\fR
  45. character it means that all users in the group
  46. \fIname\fR
  47. match\&. If it is prefixed with a
  48. \fI%\fR
  49. character the SELinux user is used to match against the
  50. \fIname\fR
  51. instead of the account name\&. Note that when SELinux is disabled the SELinux user assigned to the account cannot be determined\&. This means that such entries are never matched when SELinux is disabled and pam_sepermit will return PAM_IGNORE\&.
  52. .PP
  53. See
  54. \fBsepermit.conf\fR(5)
  55. for details\&.
  56. .SH "OPTIONS"
  57. .PP
  58. \fBdebug\fR
  59. .RS 4
  60. Turns on debugging via
  61. \fBsyslog\fR(3)\&.
  62. .RE
  63. .PP
  64. \fBconf=\fR\fB\fI/path/to/config/file\fR\fR
  65. .RS 4
  66. Path to alternative config file overriding the default\&.
  67. .RE
  68. .SH "MODULE TYPES PROVIDED"
  69. .PP
  70. The
  71. \fBauth\fR
  72. and
  73. \fBaccount\fR
  74. module types are provided\&.
  75. .SH "RETURN VALUES"
  76. .PP
  77. PAM_AUTH_ERR
  78. .RS 4
  79. SELinux is disabled or in the permissive mode and the user matches\&.
  80. .RE
  81. .PP
  82. PAM_SUCCESS
  83. .RS 4
  84. SELinux is in the enforcing mode and the user matches\&.
  85. .RE
  86. .PP
  87. PAM_IGNORE
  88. .RS 4
  89. The user does not match any entry in the config file\&.
  90. .RE
  91. .PP
  92. PAM_USER_UNKNOWN
  93. .RS 4
  94. The module was unable to determine the user\*(Aqs name\&.
  95. .RE
  96. .PP
  97. PAM_SERVICE_ERR
  98. .RS 4
  99. Error during reading or parsing the config file\&.
  100. .RE
  101. .SH "FILES"
  102. .PP
  103. /etc/security/sepermit\&.conf
  104. .RS 4
  105. Default configuration file
  106. .RE
  107. .SH "EXAMPLES"
  108. .sp
  109. .if n \{\
  110. .RS 4
  111. .\}
  112. .nf
  113. auth [success=done ignore=ignore default=bad] pam_sepermit\&.so
  114. auth required pam_unix\&.so
  115. account required pam_unix\&.so
  116. session required pam_permit\&.so
  117. .fi
  118. .if n \{\
  119. .RE
  120. .\}
  121. .SH "SEE ALSO"
  122. .PP
  123. \fBsepermit.conf\fR(5),
  124. \fBpam.conf\fR(5),
  125. \fBpam.d\fR(5),
  126. \fBpam\fR(8)
  127. \fBselinux\fR(8)
  128. .SH "AUTHOR"
  129. .PP
  130. pam_sepermit and this manual page were written by Tomas Mraz <tmraz@redhat\&.com>\&.