26 lines
921 B
Plaintext
Executable File
26 lines
921 B
Plaintext
Executable File
#!/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
|