Skip to content

Instantly share code, notes, and snippets.

@normoes
Last active July 13, 2021 18:40
Show Gist options
  • Save normoes/11d13bb8e24d620a79048a440e504234 to your computer and use it in GitHub Desktop.
Save normoes/11d13bb8e24d620a79048a440e504234 to your computer and use it in GitHub Desktop.
passwords and encrypted passwords

password creation

cli password generation

apg -a 1 -m 15 -n 15

Output

HrTvb(r&xb1~}Xr
`i;af,/z%bi8(`x
{z?h*6,ffOzTo!O
5z\Fs+oEes$`Jo%
NY:?k5UPIXhoGm#

encrypted passwords

taken from creating a password .htpasswd file for nginx

sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"

cat /etc/nginx/.htpasswd

Output

sammy:$apr1$wI1/T0nB$jEKuTJHkTOOWkopnXqC1d1

@DAVIDhaker
Copy link

What about pwgen?

@normoes
Copy link
Author

normoes commented Nov 5, 2019

Yes, of course. Thanks for mentioning this.
There are many ways to do this. The above is more of a lose collection for me :)

This link (just one of many possible links) describes some more/other methods inlcuding pwgen: https://www.ostechnix.com/4-easy-ways-to-generate-a-strong-password-in-linux/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment