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#
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
What about
pwgen
?