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