1
0

hash_password.ronn 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. hash_password(1) -- Calculate the hash of a new password, so that passwords can be reset
  2. ========================================================================================
  3. ## SYNOPSIS
  4. `hash_password` [`-p`|`--password` [password]] [`-c`|`--config` <file>]
  5. ## DESCRIPTION
  6. **hash_password** calculates the hash of a supplied password using bcrypt.
  7. `hash_password` takes a password as an parameter either on the command line
  8. or the `STDIN` if not supplied.
  9. It accepts an YAML file which can be used to specify parameters like the
  10. number of rounds for bcrypt and password_config section having the pepper
  11. value used for the hashing. By default `bcrypt_rounds` is set to **12**.
  12. The hashed password is written on the `STDOUT`.
  13. ## FILES
  14. A sample YAML file accepted by `hash_password` is described below:
  15. bcrypt_rounds: 17
  16. password_config:
  17. pepper: "random hashing pepper"
  18. ## OPTIONS
  19. * `-p`, `--password`:
  20. Read the password form the command line if [password] is supplied.
  21. If not, prompt the user and read the password form the `STDIN`.
  22. It is not recommended to type the password on the command line
  23. directly. Use the STDIN instead.
  24. * `-c`, `--config`:
  25. Read the supplied YAML <file> containing the options `bcrypt_rounds`
  26. and the `password_config` section containing the `pepper` value.
  27. ## EXAMPLES
  28. Hash from the command line:
  29. $ hash_password -p "p@ssw0rd"
  30. $2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8.X8fWFpum7SxZ9MFe
  31. Hash from the STDIN:
  32. $ hash_password
  33. Password:
  34. Confirm password:
  35. $2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX.rcuAbM8ErLoUhybG
  36. Using a config file:
  37. $ hash_password -c config.yml
  38. Password:
  39. Confirm password:
  40. $2b$12$CwI.wBNr.w3kmiUlV3T5s.GT2wH7uebDCovDrCOh18dFedlANK99O
  41. ## COPYRIGHT
  42. This man page was written by Rahul De <<rahulde@swecha.net>>
  43. for Debian GNU/Linux distribution.
  44. ## SEE ALSO
  45. synctl(1), synapse_port_db(1), register_new_matrix_user(1), synapse_review_recent_signups(1)