HASH_PASSWORD(1)
hey bestie π welcome to the HASH_PASSWORD(1) page from the General Commands Manual β it's giving password-reset realness, and honestly? iconic.
π NAME π
hash_password β calculate the hash of a new password, so that passwords can be reset π
β¨ SYNOPSIS β¨
bestie, the original page has literally no synopsis text under this heading β so we're keeping the void exactly as it is π«Ά
π¦ DESCRIPTION π¦
hash_password calculates the hash of a supplied password using bcrypt. No cap, that's the whole vibe.
hash_password takes a password as a parameter either on the command line or from the STDIN if it's not supplied.
It accepts a 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 12.
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 from the command line if[password]is supplied, or fromSTDIN. If not, prompt the user and read the password from the tty prompt. It is not recommended to type the password on the command line directly. Use theSTDINinstead.-c,--configβ Read the supplied YAML file containing the optionsbcrypt_roundsand thepassword_configsection containing the pepper value.
π₯ EXAMPLES π₯
Hash from the command line:
$ hash_password -p "p@ssw0rd"
$2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8.X8fWFpum7SxZ9MFe
Hash from the stdin:
$ cat password_file | hash_password
Password:
Confirm password:
$2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX.rcuAbM8ErLoUhybG
Hash from the prompt:
$ 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 the Debian GNU/Linux distribution. Periodt. π
π«Ά SEE ALSO π«Ά
August 2024 β’ HASH_PASSWORD(1) β’ stay hydrated and hash responsibly, bestie π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms