From d11b19a56fc72eddfa8ab8ef63be2615c439238a Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Thu, 22 Jun 2023 17:42:38 +0200 Subject: [PATCH] shell: add alias for hashed pw creation --- files/shell/.shellrc.alias | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 2a1e617..0adfa85 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -44,7 +44,17 @@ alias condown='nmcli con down id' alias conscan='nmcli dev wifi' alias conedit='nm-connection-editor' -# functions +# password hash (sed needed when using in docker-compose) +pwhash() { + name=$1 + if [ -z $name ]; then + echo "Please enter a username." + return + fi + echo $(htpasswd -nB ${name}) | sed -e s/\\$/\\$\\$/g +} + +# ocr ocr() { file=$1 if [ -z $file ]; then