diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-12-20 16:48:47 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-12-20 16:48:47 +0000 |
commit | 0b26feb42264e742968e2a573fa1390c667f41a8 (patch) | |
tree | 2b098ed5013ce06a5bb72e540d81d9dbe71a1442 /debian/hash_password.ronn | |
parent | Merge pull request #4309 from KB1RD/KB1RD-fixes (diff) | |
parent | Clarify that py2 packages will continue to exist (diff) | |
download | synapse-0b26feb42264e742968e2a573fa1390c667f41a8.tar.xz |
Merge branch 'master' into develop
Diffstat (limited to 'debian/hash_password.ronn')
-rw-r--r-- | debian/hash_password.ronn | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/debian/hash_password.ronn b/debian/hash_password.ronn new file mode 100644 index 0000000000..0b2afa7374 --- /dev/null +++ b/debian/hash_password.ronn @@ -0,0 +1,69 @@ +hash_password(1) -- Calculate the hash of a new password, so that passwords can be reset +======================================================================================== + +## SYNOPSIS + +`hash_password` [`-p`|`--password` [password]] [`-c`|`--config` <file>] + +## DESCRIPTION + +**hash_password** calculates the hash of a supplied password using bcrypt. + +`hash_password` takes a password as an parameter either on the command line +or the `STDIN` if not supplied. + +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 `bcrypt_rounds` is set to **10**. + +The hashed password is written on the `STDOUT`. + +## FILES + +A sample YAML file accepted by `hash_password` is described below: + + bcrypt_rounds: 17 + password_config: + pepper: "random hashing pepper" + +## OPTIONS + + * `-p`, `--password`: + Read the password form the command line if [password] is supplied. + If not, prompt the user and read the password form the `STDIN`. + It is not recommended to type the password on the command line + directly. Use the STDIN instead. + + * `-c`, `--config`: + Read the supplied YAML <file> containing the options `bcrypt_rounds` + and the `password_config` section containing the `pepper` value. + +## EXAMPLES + +Hash from the command line: + + $ hash_password -p "p@ssw0rd" + $2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8.X8fWFpum7SxZ9MFe + +Hash from the STDIN: + + $ hash_password + Password: + Confirm password: + $2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX.rcuAbM8ErLoUhybG + +Using a config file: + + $ hash_password -c config.yml + Password: + Confirm password: + $2b$12$CwI.wBNr.w3kmiUlV3T5s.GT2wH7uebDCovDrCOh18dFedlANK99O + +## COPYRIGHT + +This man page was written by Rahul De <<rahulde@swecha.net>> +for Debian GNU/Linux distribution. + +## SEE ALSO + +synctl(1), synapse_port_db(1), register_new_matrix_user(1) |