From e8e9ecf25dc9098343af405d21f636f426e5e2e7 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 16 May 2023 11:33:00 +0200 Subject: [PATCH] Script comptes utilisateurs du dokuwiki --- scripts/dau1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/dau1 diff --git a/scripts/dau1 b/scripts/dau1 new file mode 100755 index 0000000..9041d4d --- /dev/null +++ b/scripts/dau1 @@ -0,0 +1,25 @@ + #!/bin/bash + + defautpassword="Azerty1+" + group="admin" + + read -p "etes-vous sur de vouloir creer un utilisateur dans DokuWiki ? [y/n]: " valide + if [ "$valide" == "y" ]; then + + hash=$(htpasswd -bnBC 10 dorian "$defautpassword" | tr -d '\n') + hashfin="$hash:dorian:dorian@ap23.fr:$group,user" + echo "$hashfin" >> /var/www/html/doku/conf/users.auth.php + + hash=$(htpasswd -bnBC 10 clement "$defautpassword" | tr -d '\n') + hashfin="$hash:clement:clement@ap23.fr:$group,user" + echo "$hashfin" >> /var/www/html/doku/conf/users.auth.php + + hash=$(htpasswd -bnBC 10 cerena "$defautpassword" | tr -d '\n') + hashfin="$hash:cerena:cerena@ap23.fr:$group,user" + echo "$hashfin" >> /var/www/html/doku/conf/users.auth.php + + hash=$(htpasswd -bnBC 10 samuel "$defautpassword" | tr -d '\n') + hashfin="$hash:samuel:samuel@ap23.fr:$group,user" + echo "$hashfin" >> /var/www/html/doku/conf/users.auth.php + + fi