pam_userdb.8 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. '\" t
  2. .\" Title: pam_userdb
  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_USERDB" "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_userdb \- PAM module to authenticate against a db database
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBpam_userdb\&.so\fR\ 'u
  34. \fBpam_userdb\&.so\fR db=\fI/path/database\fR [debug] [crypt=[crypt|none]] [icase] [dump] [try_first_pass] [use_first_pass] [unknown_ok] [key_only]
  35. .SH "DESCRIPTION"
  36. .PP
  37. The pam_userdb module is used to verify a username/password pair against values stored in a Berkeley DB database\&. The database is indexed by the username, and the data fields corresponding to the username keys are the passwords\&.
  38. .SH "OPTIONS"
  39. .PP
  40. \fBcrypt=[crypt|none]\fR
  41. .RS 4
  42. Indicates whether encrypted or plaintext passwords are stored in the database\&. If it is
  43. \fBcrypt\fR, passwords should be stored in the database in
  44. \fBcrypt\fR(3)
  45. form\&. If
  46. \fBnone\fR
  47. is selected, passwords should be stored in the database as plaintext\&.
  48. .RE
  49. .PP
  50. \fBdb=\fR\fB\fI/path/database\fR\fR
  51. .RS 4
  52. Use the
  53. /path/database
  54. database for performing lookup\&. There is no default; the module will return
  55. \fBPAM_IGNORE\fR
  56. if no database is provided\&. Note that the path to the database file should be specified without the
  57. \&.db
  58. suffix\&.
  59. .RE
  60. .PP
  61. \fBdebug\fR
  62. .RS 4
  63. Print debug information\&. Note that password hashes, both from db and computed, will be printed to syslog\&.
  64. .RE
  65. .PP
  66. \fBdump\fR
  67. .RS 4
  68. Dump all the entries in the database to the log\&. Don\*(Aqt do this by default!
  69. .RE
  70. .PP
  71. \fBicase\fR
  72. .RS 4
  73. Make the password verification to be case insensitive (ie when working with registration numbers and such)\&. Only works with plaintext password storage\&.
  74. .RE
  75. .PP
  76. \fBtry_first_pass\fR
  77. .RS 4
  78. Use the authentication token previously obtained by another module that did the conversation with the application\&. If this token can not be obtained then the module will try to converse\&. This option can be used for stacking different modules that need to deal with the authentication tokens\&.
  79. .RE
  80. .PP
  81. \fBuse_first_pass\fR
  82. .RS 4
  83. Use the authentication token previously obtained by another module that did the conversation with the application\&. If this token can not be obtained then the module will fail\&. This option can be used for stacking different modules that need to deal with the authentication tokens\&.
  84. .RE
  85. .PP
  86. \fBunknown_ok\fR
  87. .RS 4
  88. Do not return error when checking for a user that is not in the database\&. This can be used to stack more than one pam_userdb module that will check a username/password pair in more than a database\&.
  89. .RE
  90. .PP
  91. \fBkey_only\fR
  92. .RS 4
  93. The username and password are concatenated together in the database hash as \*(Aqusername\-password\*(Aq with a random value\&. if the concatenation of the username and password with a dash in the middle returns any result, the user is valid\&. this is useful in cases where the username may not be unique but the username and password pair are\&.
  94. .RE
  95. .SH "MODULE TYPES PROVIDED"
  96. .PP
  97. The
  98. \fBauth\fR
  99. and
  100. \fBaccount\fR
  101. module types are provided\&.
  102. .SH "RETURN VALUES"
  103. .PP
  104. PAM_AUTH_ERR
  105. .RS 4
  106. Authentication failure\&.
  107. .RE
  108. .PP
  109. PAM_AUTHTOK_RECOVERY_ERR
  110. .RS 4
  111. Authentication information cannot be recovered\&.
  112. .RE
  113. .PP
  114. PAM_BUF_ERR
  115. .RS 4
  116. Memory buffer error\&.
  117. .RE
  118. .PP
  119. PAM_CONV_ERR
  120. .RS 4
  121. Conversation failure\&.
  122. .RE
  123. .PP
  124. PAM_SERVICE_ERR
  125. .RS 4
  126. Error in service module\&.
  127. .RE
  128. .PP
  129. PAM_SUCCESS
  130. .RS 4
  131. Success\&.
  132. .RE
  133. .PP
  134. PAM_USER_UNKNOWN
  135. .RS 4
  136. User not known to the underlying authentication module\&.
  137. .RE
  138. .SH "EXAMPLES"
  139. .sp
  140. .if n \{\
  141. .RS 4
  142. .\}
  143. .nf
  144. auth sufficient pam_userdb\&.so icase db=/etc/dbtest
  145. .fi
  146. .if n \{\
  147. .RE
  148. .\}
  149. .SH "SEE ALSO"
  150. .PP
  151. \fBcrypt\fR(3),
  152. \fBpam.conf\fR(5),
  153. \fBpam.d\fR(5),
  154. \fBpam\fR(8)
  155. .SH "AUTHOR"
  156. .PP
  157. pam_userdb was written by Cristian Gafton >gafton@redhat\&.com<\&.