Skip to content

htpasswd

Install

apt install apache2-utils

Basic

newpass=`shuf -ez -n20 {A..Z} {a..z} {0..9}`
echo "Your new pass is: " $newpass
htpasswd -bc .htpasswd admin $newpass

bcrypt

$ htpasswd -b -B -C 10 -n username password
username:$2y$10$7Puxg0ggVVClCfI5sdJx.OdFyuW8GpVyHYwyuOY9J0OkjxOmA63au

generate-random-value