pam_securetty.8.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  4. <refentry id="pam_securetty">
  5. <refmeta>
  6. <refentrytitle>pam_securetty</refentrytitle>
  7. <manvolnum>8</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_securetty-name">
  11. <refname>pam_securetty</refname>
  12. <refpurpose>Limit root login to special devices</refpurpose>
  13. </refnamediv>
  14. <refsynopsisdiv>
  15. <cmdsynopsis id="pam_securetty-cmdsynopsis">
  16. <command>pam_securetty.so</command>
  17. <arg choice="opt">
  18. debug
  19. </arg>
  20. </cmdsynopsis>
  21. </refsynopsisdiv>
  22. <refsect1 id="pam_securetty-description">
  23. <title>DESCRIPTION</title>
  24. <para>
  25. pam_securetty is a PAM module that allows root logins only if the
  26. user is logging in on a "secure" tty, as defined by the listing
  27. in the <filename>securetty</filename> file. pam_securetty checks at
  28. first, if <filename>/etc/securetty</filename> exists. If not and
  29. it was built with vendordir support, it will use
  30. <filename>%vendordir%/securetty</filename>. pam_securetty also
  31. checks that the <filename>securetty</filename> files are plain
  32. files and not world writable. It will also allow root logins on
  33. the tty specified with <option>console=</option> switch on the
  34. kernel command line and on ttys from the
  35. <filename>/sys/class/tty/console/active</filename>.
  36. </para>
  37. <para>
  38. This module has no effect on non-root users and requires that the
  39. application fills in the <emphasis remap='B'>PAM_TTY</emphasis>
  40. item correctly.
  41. </para>
  42. <para>
  43. For canonical usage, should be listed as a
  44. <emphasis remap='B'>required</emphasis> authentication method
  45. before any <emphasis remap='B'>sufficient</emphasis>
  46. authentication methods.
  47. </para>
  48. </refsect1>
  49. <refsect1 id="pam_securetty-options">
  50. <title>OPTIONS</title>
  51. <variablelist>
  52. <varlistentry>
  53. <term>
  54. <option>debug</option>
  55. </term>
  56. <listitem>
  57. <para>
  58. Print debug information.
  59. </para>
  60. </listitem>
  61. </varlistentry>
  62. <varlistentry>
  63. <term>
  64. <option>noconsole</option>
  65. </term>
  66. <listitem>
  67. <para>
  68. Do not automatically allow root logins on the kernel console
  69. device, as specified on the kernel command line or by the sys file,
  70. if it is not also specified in the
  71. <filename>securetty</filename> file.
  72. </para>
  73. </listitem>
  74. </varlistentry>
  75. </variablelist>
  76. </refsect1>
  77. <refsect1 id="pam_securetty-types">
  78. <title>MODULE TYPES PROVIDED</title>
  79. <para>
  80. Only the <option>auth</option> module type is provided.
  81. </para>
  82. </refsect1>
  83. <refsect1 id='pam_securetty-return_values'>
  84. <title>RETURN VALUES</title>
  85. <variablelist>
  86. <varlistentry>
  87. <term>PAM_SUCCESS</term>
  88. <listitem>
  89. <para>
  90. The user is allowed to continue authentication.
  91. Either the user is not root, or the root user is
  92. trying to log in on an acceptable device.
  93. </para>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry>
  97. <term>PAM_AUTH_ERR</term>
  98. <listitem>
  99. <para>
  100. Authentication is rejected. Either root is attempting to
  101. log in via an unacceptable device, or the
  102. <filename>securetty</filename> file is world writable or
  103. not a normal file.
  104. </para>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry>
  108. <term>PAM_BUF_ERR</term>
  109. <listitem>
  110. <para>
  111. Memory buffer error.
  112. </para>
  113. </listitem>
  114. </varlistentry>
  115. <varlistentry>
  116. <term>PAM_CONV_ERR</term>
  117. <listitem>
  118. <para>
  119. The conversation method supplied by the application
  120. failed to obtain the username.
  121. </para>
  122. </listitem>
  123. </varlistentry>
  124. <varlistentry>
  125. <term>PAM_INCOMPLETE</term>
  126. <listitem>
  127. <para>
  128. The conversation method supplied by the application
  129. returned PAM_CONV_AGAIN.
  130. </para>
  131. </listitem>
  132. </varlistentry>
  133. <varlistentry>
  134. <term>PAM_SERVICE_ERR</term>
  135. <listitem>
  136. <para>
  137. An error occurred while the module was determining the
  138. user's name or tty, or the module could not open
  139. the <filename>securetty</filename> file.
  140. </para>
  141. </listitem>
  142. </varlistentry>
  143. <varlistentry>
  144. <term>PAM_USER_UNKNOWN</term>
  145. <listitem>
  146. <para>
  147. The module could not find the user name in the
  148. <filename>/etc/passwd</filename> file to verify whether
  149. the user had a UID of 0. Therefore, the results of running
  150. this module are ignored.
  151. </para>
  152. </listitem>
  153. </varlistentry>
  154. </variablelist>
  155. </refsect1>
  156. <refsect1 id='pam_securetty-examples'>
  157. <title>EXAMPLES</title>
  158. <para>
  159. <programlisting>
  160. auth required pam_securetty.so
  161. auth required pam_unix.so
  162. </programlisting>
  163. </para>
  164. </refsect1>
  165. <refsect1 id='pam_securetty-see_also'>
  166. <title>SEE ALSO</title>
  167. <para>
  168. <citerefentry>
  169. <refentrytitle>securetty</refentrytitle><manvolnum>5</manvolnum>
  170. </citerefentry>,
  171. <citerefentry>
  172. <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
  173. </citerefentry>,
  174. <citerefentry>
  175. <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
  176. </citerefentry>,
  177. <citerefentry>
  178. <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
  179. </citerefentry>
  180. </para>
  181. </refsect1>
  182. <refsect1 id='pam_securetty-author'>
  183. <title>AUTHOR</title>
  184. <para>
  185. pam_securetty was written by Elliot Lee &lt;sopwith@cuc.edu&gt;.
  186. </para>
  187. </refsect1>
  188. </refentry>