Skip to content

Instantly share code, notes, and snippets.

@DavesCodeMusings
Created November 24, 2024 05:49
Show Gist options
  • Select an option

  • Save DavesCodeMusings/a671f6a66e1320c11d5ae0cfb48c35d2 to your computer and use it in GitHub Desktop.

Select an option

Save DavesCodeMusings/a671f6a66e1320c11d5ae0cfb48c35d2 to your computer and use it in GitHub Desktop.
Random Complex Password
#!/bin/sh
# Generate a random complex password on a Linux system.
tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 32; echo
# Reference:
# https://owasp.org/www-community/password-special-characters
# https://www.gnu.org/software/coreutils/manual/html_node/tr-invocation.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment