pam_securetty.8 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. '\" t
  2. .\" Title: pam_securetty
  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_SECURETTY" "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_securetty \- Limit root login to special devices
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBpam_securetty\&.so\fR\ 'u
  34. \fBpam_securetty\&.so\fR [debug]
  35. .SH "DESCRIPTION"
  36. .PP
  37. pam_securetty is a PAM module that allows root logins only if the user is logging in on a "secure" tty, as defined by the listing in the
  38. securetty
  39. file\&. pam_securetty checks at first, if
  40. /etc/securetty
  41. exists\&. If not and it was built with vendordir support, it will use
  42. <vendordir>/securetty\&. pam_securetty also checks that the
  43. securetty
  44. files are plain files and not world writable\&. It will also allow root logins on the tty specified with
  45. \fBconsole=\fR
  46. switch on the kernel command line and on ttys from the
  47. /sys/class/tty/console/active\&.
  48. .PP
  49. This module has no effect on non\-root users and requires that the application fills in the
  50. \fBPAM_TTY\fR
  51. item correctly\&.
  52. .PP
  53. For canonical usage, should be listed as a
  54. \fBrequired\fR
  55. authentication method before any
  56. \fBsufficient\fR
  57. authentication methods\&.
  58. .SH "OPTIONS"
  59. .PP
  60. \fBdebug\fR
  61. .RS 4
  62. Print debug information\&.
  63. .RE
  64. .PP
  65. \fBnoconsole\fR
  66. .RS 4
  67. Do not automatically allow root logins on the kernel console device, as specified on the kernel command line or by the sys file, if it is not also specified in the
  68. securetty
  69. file\&.
  70. .RE
  71. .SH "MODULE TYPES PROVIDED"
  72. .PP
  73. Only the
  74. \fBauth\fR
  75. module type is provided\&.
  76. .SH "RETURN VALUES"
  77. .PP
  78. PAM_SUCCESS
  79. .RS 4
  80. The user is allowed to continue authentication\&. Either the user is not root, or the root user is trying to log in on an acceptable device\&.
  81. .RE
  82. .PP
  83. PAM_AUTH_ERR
  84. .RS 4
  85. Authentication is rejected\&. Either root is attempting to log in via an unacceptable device, or the
  86. securetty
  87. file is world writable or not a normal file\&.
  88. .RE
  89. .PP
  90. PAM_BUF_ERR
  91. .RS 4
  92. Memory buffer error\&.
  93. .RE
  94. .PP
  95. PAM_CONV_ERR
  96. .RS 4
  97. The conversation method supplied by the application failed to obtain the username\&.
  98. .RE
  99. .PP
  100. PAM_INCOMPLETE
  101. .RS 4
  102. The conversation method supplied by the application returned PAM_CONV_AGAIN\&.
  103. .RE
  104. .PP
  105. PAM_SERVICE_ERR
  106. .RS 4
  107. An error occurred while the module was determining the user\*(Aqs name or tty, or the module could not open the
  108. securetty
  109. file\&.
  110. .RE
  111. .PP
  112. PAM_USER_UNKNOWN
  113. .RS 4
  114. The module could not find the user name in the
  115. /etc/passwd
  116. file to verify whether the user had a UID of 0\&. Therefore, the results of running this module are ignored\&.
  117. .RE
  118. .SH "EXAMPLES"
  119. .PP
  120. .if n \{\
  121. .RS 4
  122. .\}
  123. .nf
  124. auth required pam_securetty\&.so
  125. auth required pam_unix\&.so
  126. .fi
  127. .if n \{\
  128. .RE
  129. .\}
  130. .sp
  131. .SH "SEE ALSO"
  132. .PP
  133. \fBsecuretty\fR(5),
  134. \fBpam.conf\fR(5),
  135. \fBpam.d\fR(5),
  136. \fBpam\fR(8)
  137. .SH "AUTHOR"
  138. .PP
  139. pam_securetty was written by Elliot Lee <sopwith@cuc\&.edu>\&.