add entry to existing htpasswd User: MyUser, Password: Secrete printf "MyUser:$(openssl passwd -apr1 Secrete)\n" >> htpasswd Create a bunch of users with the same password for i in john jose josh joe ; do printf "$i:$(openssl passwd -apr1 Secrete)\n" >> htpasswd done