Files
oam/knowledge base/generate random passwords.md
2023-08-04 20:57:18 +02:00

867 B

Generate random passwords

Table of contents

  1. TL;DR
  2. Sources

TL;DR

# Print out 32 random characters.
openssl rand -base64 32
gpg --gen-random --armor 1 32

# Print out 32 random alphanumerical characters.
date '+%s' | sha256sum | base64 | head -c '32'
cat '/dev/urandom' | LC_ALL='C' tr -dc '[:alnum:]' | fold -w '32' | head -n '1'

# XKCD-inspired passwords.
pipx run 'xkcdpass'

Sources