OPENSSL-PASSWD(1ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… NAME πŸ’…

openssl-passwd β€” bestie, this is literally the command that computes password hashes ✨


πŸŽ€ SYNOPSIS πŸŽ€

openssl passwd [-help] [-1] [-apr1] [-aixmd5] [-5] [-6] [-salt string]
[-in file] [-stdin] [-noverify] [-quiet] [-table] [-reverse] [-rand
files] [-writerand file] [-provider name] [-provider-path path]
[-provparam [name:]key=value] [-propquery propq] [password]
ok the manual name is OPENSSL-PASSWD(1ossl) β€” that's the whole title, section 1 of the OpenSSL fam, iykyk 🫢

🌸 DESCRIPTION 🌸

So here's the vibe: this command takes a password and gives you back its hash πŸ”₯. You can either type one password at run-time (the main character way), or hand it a whole list of passwords and it'll hash each one for you.

Where does that password list come from? Pick your fighter:

  • the file you name with -in
  • stdin, if you pass -stdin
  • the command line, or
  • the terminal β€” literally otherwise πŸ’–

✨ OPTIONS ✨

  • -help β€” prints out a usage message, the classic "wait what were the flags again" move 😌
  • -1 β€” use the MD5 based BSD password algorithm 1. This is the default, no cap πŸ‘‘
  • -apr1 β€” use the apr1 algorithm (that's the Apache variant of the BSD algorithm, slay)
  • -aixmd5 β€” use the AIX MD5 algorithm (AIX's own variant of the BSD algorithm, she's got range πŸ’…)
  • -5, -6 β€” use the SHA256 / SHA512 based algorithms defined by Ulrich Drepper. See <https://www.akkadia.org/drepper/SHA-crypt.txt> πŸ“–
  • -salt string β€” use the salt you specify πŸ§‚. Heads up: when you're reading a password from the terminal, this option implies -noverify
  • -in file β€” read passwords from file πŸ“
  • -stdin β€” read passwords from stdin, pipe gang represent 🌈
  • -noverify β€” don't verify when reading a password from the terminal (so it won't ask you to type it twice, we live 🫢)
  • -quiet β€” don't output warnings when passwords given at the command line get truncated 🀫
  • -table β€” in the output list, prepend the cleartext password AND a TAB character to each password hash πŸ“‹
  • -reverse β€” when -table is used, flip the order of cleartext and hash πŸ”„
  • -rand files, -writerand file β€” check "Random State Options" in openssl(1) for the deets ✨
  • -provider name, -provider-path path, -provparam [name:]key=value, -propquery propq β€” check "Provider Options" in openssl(1), provider(7), and property(7) πŸ’œ

πŸ¦‹ EXAMPLES πŸ¦‹

Ok these are the actual examples, copy them exactly bestie, don't freestyle πŸ’–

% openssl passwd -1 -salt xxxxxxxx password
$1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.

% openssl passwd -apr1 -salt xxxxxxxx password
$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0

% openssl passwd -aixmd5 -salt xxxxxxxx password
xxxxxxxx$8Oaipk/GPKhC64w/YVeFD/

πŸ’€ HISTORY πŸ’€

Not me having to report this: the -crypt option was 🚫 removed 🚫 in OpenSSL 3.0. Gone. RIP to a real one 😭


Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page, bestie πŸŽ€βœ¨ β€” signed off from version 3.5.0, dated 2026-09-25, manual OPENSSL-PASSWD(1ossl). go forth and hash responsibly πŸ’…πŸ’–

πŸ“¦ where this page comes from