pam_userdb.8.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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_userdb">
  5. <refmeta>
  6. <refentrytitle>pam_userdb</refentrytitle>
  7. <manvolnum>8</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_userdb-name">
  11. <refname>pam_userdb</refname>
  12. <refpurpose>PAM module to authenticate against a db database</refpurpose>
  13. </refnamediv>
  14. <refsynopsisdiv>
  15. <cmdsynopsis id="pam_userdb-cmdsynopsis">
  16. <command>pam_userdb.so</command>
  17. <arg choice="plain">
  18. db=<replaceable>/path/database</replaceable>
  19. </arg>
  20. <arg choice="opt">
  21. debug
  22. </arg>
  23. <arg choice="opt">
  24. crypt=[crypt|none]
  25. </arg>
  26. <arg choice="opt">
  27. icase
  28. </arg>
  29. <arg choice="opt">
  30. dump
  31. </arg>
  32. <arg choice="opt">
  33. try_first_pass
  34. </arg>
  35. <arg choice="opt">
  36. use_first_pass
  37. </arg>
  38. <arg choice="opt">
  39. unknown_ok
  40. </arg>
  41. <arg choice="opt">
  42. key_only
  43. </arg>
  44. </cmdsynopsis>
  45. </refsynopsisdiv>
  46. <refsect1 id="pam_userdb-description">
  47. <title>DESCRIPTION</title>
  48. <para>
  49. The pam_userdb module is used to verify a username/password pair
  50. against values stored in a Berkeley DB database. The database is
  51. indexed by the username, and the data fields corresponding to the
  52. username keys are the passwords.
  53. </para>
  54. </refsect1>
  55. <refsect1 id="pam_userdb-options">
  56. <title>OPTIONS</title>
  57. <variablelist>
  58. <varlistentry>
  59. <term>
  60. <option>crypt=[crypt|none]</option>
  61. </term>
  62. <listitem>
  63. <para>
  64. Indicates whether encrypted or plaintext passwords are stored
  65. in the database. If it is <option>crypt</option>, passwords
  66. should be stored in the database in
  67. <citerefentry>
  68. <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
  69. </citerefentry> form. If <option>none</option> is selected,
  70. passwords should be stored in the database as plaintext.
  71. </para>
  72. </listitem>
  73. </varlistentry>
  74. <varlistentry>
  75. <term>
  76. <option>db=<replaceable>/path/database</replaceable></option>
  77. </term>
  78. <listitem>
  79. <para>
  80. Use the <filename>/path/database</filename> database for
  81. performing lookup. There is no default; the module will
  82. return <emphasis remap='B'>PAM_IGNORE</emphasis> if no
  83. database is provided. Note that the path to the database file
  84. should be specified without the <filename>.db</filename> suffix.
  85. </para>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry>
  89. <term>
  90. <option>debug</option>
  91. </term>
  92. <listitem>
  93. <para>
  94. Print debug information. Note that password hashes, both from db
  95. and computed, will be printed to syslog.
  96. </para>
  97. </listitem>
  98. </varlistentry>
  99. <varlistentry>
  100. <term>
  101. <option>dump</option>
  102. </term>
  103. <listitem>
  104. <para>
  105. Dump all the entries in the database to the log.
  106. Don't do this by default!
  107. </para>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry>
  111. <term>
  112. <option>icase</option>
  113. </term>
  114. <listitem>
  115. <para>
  116. Make the password verification to be case insensitive
  117. (ie when working with registration numbers and such).
  118. Only works with plaintext password storage.
  119. </para>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry>
  123. <term>
  124. <option>try_first_pass</option>
  125. </term>
  126. <listitem>
  127. <para>
  128. Use the authentication token previously obtained by
  129. another module that did the conversation with the
  130. application. If this token can not be obtained then
  131. the module will try to converse. This option can
  132. be used for stacking different modules that need to
  133. deal with the authentication tokens.
  134. </para>
  135. </listitem>
  136. </varlistentry>
  137. <varlistentry>
  138. <term>
  139. <option>use_first_pass</option>
  140. </term>
  141. <listitem>
  142. <para>
  143. Use the authentication token previously obtained by
  144. another module that did the conversation with the
  145. application. If this token can not be obtained then
  146. the module will fail. This option can be used for
  147. stacking different modules that need to deal with
  148. the authentication tokens.
  149. </para>
  150. </listitem>
  151. </varlistentry>
  152. <varlistentry>
  153. <term>
  154. <option>unknown_ok</option>
  155. </term>
  156. <listitem>
  157. <para>
  158. Do not return error when checking for a user that is
  159. not in the database. This can be used to stack more
  160. than one pam_userdb module that will check a
  161. username/password pair in more than a database.
  162. </para>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry>
  166. <term>
  167. <option>key_only</option>
  168. </term>
  169. <listitem>
  170. <para>
  171. The username and password are concatenated together
  172. in the database hash as 'username-password' with a
  173. random value. if the concatenation of the username and
  174. password with a dash in the middle returns any result,
  175. the user is valid. this is useful in cases where
  176. the username may not be unique but the username and
  177. password pair are.
  178. </para>
  179. </listitem>
  180. </varlistentry>
  181. </variablelist>
  182. </refsect1>
  183. <refsect1 id="pam_userdb-types">
  184. <title>MODULE TYPES PROVIDED</title>
  185. <para>
  186. The <option>auth</option> and <option>account</option> module
  187. types are provided.
  188. </para>
  189. </refsect1>
  190. <refsect1 id='pam_userdb-return_values'>
  191. <title>RETURN VALUES</title>
  192. <variablelist>
  193. <varlistentry>
  194. <term>PAM_AUTH_ERR</term>
  195. <listitem>
  196. <para>Authentication failure.</para>
  197. </listitem>
  198. </varlistentry>
  199. <varlistentry>
  200. <term>PAM_AUTHTOK_RECOVERY_ERR</term>
  201. <listitem>
  202. <para>
  203. Authentication information cannot be recovered.
  204. </para>
  205. </listitem>
  206. </varlistentry>
  207. <varlistentry>
  208. <term>PAM_BUF_ERR</term>
  209. <listitem>
  210. <para>
  211. Memory buffer error.
  212. </para>
  213. </listitem>
  214. </varlistentry>
  215. <varlistentry>
  216. <term>PAM_CONV_ERR</term>
  217. <listitem>
  218. <para>
  219. Conversation failure.
  220. </para>
  221. </listitem>
  222. </varlistentry>
  223. <varlistentry>
  224. <term>PAM_SERVICE_ERR</term>
  225. <listitem>
  226. <para>
  227. Error in service module.
  228. </para>
  229. </listitem>
  230. </varlistentry>
  231. <varlistentry>
  232. <term>PAM_SUCCESS</term>
  233. <listitem>
  234. <para>
  235. Success.
  236. </para>
  237. </listitem>
  238. </varlistentry>
  239. <varlistentry>
  240. <term>PAM_USER_UNKNOWN</term>
  241. <listitem>
  242. <para>
  243. User not known to the underlying authentication module.
  244. </para>
  245. </listitem>
  246. </varlistentry>
  247. </variablelist>
  248. </refsect1>
  249. <refsect1 id='pam_userdb-examples'>
  250. <title>EXAMPLES</title>
  251. <programlisting>
  252. auth sufficient pam_userdb.so icase db=/etc/dbtest
  253. </programlisting>
  254. </refsect1>
  255. <refsect1 id='pam_userdb-see_also'>
  256. <title>SEE ALSO</title>
  257. <para>
  258. <citerefentry>
  259. <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
  260. </citerefentry>,
  261. <citerefentry>
  262. <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
  263. </citerefentry>,
  264. <citerefentry>
  265. <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
  266. </citerefentry>,
  267. <citerefentry>
  268. <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
  269. </citerefentry>
  270. </para>
  271. </refsect1>
  272. <refsect1 id='pam_userdb-author'>
  273. <title>AUTHOR</title>
  274. <para>
  275. pam_userdb was written by Cristian Gafton &gt;gafton@redhat.com&lt;.
  276. </para>
  277. </refsect1>
  278. </refentry>