From 6b26036ab837f0dbfae2b22b0f7b0c28655cf9a2 Mon Sep 17 00:00:00 2001 From: lanxu Date: Thu, 11 Jan 2018 20:55:39 +0200 Subject: [PATCH] Added htpasswd replacement for systems without apache --- htpasswd.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 htpasswd.sh diff --git a/htpasswd.sh b/htpasswd.sh new file mode 100755 index 0000000..82373f5 --- /dev/null +++ b/htpasswd.sh @@ -0,0 +1,14 @@ +#!/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