scripts/tools/htpasswd.sh
2022-04-03 23:53:51 +03:00

15 lines
222 B
Bash
Executable File

#!/bin/sh
if [ $# -eq 0 ]
then
echo "Please provide output file"
exit -1
fi
OUTPUT=$1
echo -n "Enter username and press [ENTER]: "
read USERNAME
echo -n "$USERNAME:" >> $OUTPUT
openssl passwd -apr1 >> $OUTPUT