Compare commits

...

2 Commits

Author SHA1 Message Date
root
e8e9ecf25d Script comptes utilisateurs du dokuwiki 2023-05-16 11:33:00 +02:00
root
a2a5991fa2 sauvegarde 2023-05-11 23:00:36 +02:00
2 changed files with 25 additions and 1 deletions
sauvBDD
scripts

@ -1 +0,0 @@
Subproject commit b8711daa5dd4326e2beafedae35174f1ccbad693

25
scripts/dau1 Executable file

@ -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