1
0

hash_password.1 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .\" generated with Ronn/v0.7.3
  2. .\" http://github.com/rtomayko/ronn/tree/0.7.3
  3. .
  4. .TH "HASH_PASSWORD" "1" "February 2017" "" ""
  5. .
  6. .SH "NAME"
  7. \fBhash_password\fR \- Calculate the hash of a new password, so that passwords can be reset
  8. .
  9. .SH "SYNOPSIS"
  10. \fBhash_password\fR [\fB\-p\fR|\fB\-\-password\fR [password]] [\fB\-c\fR|\fB\-\-config\fR \fIfile\fR]
  11. .
  12. .SH "DESCRIPTION"
  13. \fBhash_password\fR calculates the hash of a supplied password using bcrypt\.
  14. .
  15. .P
  16. \fBhash_password\fR takes a password as an parameter either on the command line or the \fBSTDIN\fR if not supplied\.
  17. .
  18. .P
  19. It accepts an YAML file which can be used to specify parameters like the number of rounds for bcrypt and password_config section having the pepper value used for the hashing\. By default \fBbcrypt_rounds\fR is set to \fB10\fR\.
  20. .
  21. .P
  22. The hashed password is written on the \fBSTDOUT\fR\.
  23. .
  24. .SH "FILES"
  25. A sample YAML file accepted by \fBhash_password\fR is described below:
  26. .
  27. .P
  28. bcrypt_rounds: 17 password_config: pepper: "random hashing pepper"
  29. .
  30. .SH "OPTIONS"
  31. .
  32. .TP
  33. \fB\-p\fR, \fB\-\-password\fR
  34. Read the password form the command line if [password] is supplied\. If not, prompt the user and read the password form the \fBSTDIN\fR\. It is not recommended to type the password on the command line directly\. Use the STDIN instead\.
  35. .
  36. .TP
  37. \fB\-c\fR, \fB\-\-config\fR
  38. Read the supplied YAML \fIfile\fR containing the options \fBbcrypt_rounds\fR and the \fBpassword_config\fR section containing the \fBpepper\fR value\.
  39. .
  40. .SH "EXAMPLES"
  41. Hash from the command line:
  42. .
  43. .IP "" 4
  44. .
  45. .nf
  46. $ hash_password \-p "p@ssw0rd"
  47. $2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8\.X8fWFpum7SxZ9MFe
  48. .
  49. .fi
  50. .
  51. .IP "" 0
  52. .
  53. .P
  54. Hash from the STDIN:
  55. .
  56. .IP "" 4
  57. .
  58. .nf
  59. $ hash_password
  60. Password:
  61. Confirm password:
  62. $2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX\.rcuAbM8ErLoUhybG
  63. .
  64. .fi
  65. .
  66. .IP "" 0
  67. .
  68. .P
  69. Using a config file:
  70. .
  71. .IP "" 4
  72. .
  73. .nf
  74. $ hash_password \-c config\.yml
  75. Password:
  76. Confirm password:
  77. $2b$12$CwI\.wBNr\.w3kmiUlV3T5s\.GT2wH7uebDCovDrCOh18dFedlANK99O
  78. .
  79. .fi
  80. .
  81. .IP "" 0
  82. .
  83. .SH "COPYRIGHT"
  84. This man page was written by Rahul De <\fIrahulde@swecha\.net\fR> for Debian GNU/Linux distribution\.
  85. .
  86. .SH "SEE ALSO"
  87. synctl(1), synapse_port_db(1), register_new_matrix_user(1)