Script comptes utilisateurs du dokuwiki
This commit is contained in:
parent
a2a5991fa2
commit
e8e9ecf25d
25
scripts/dau1
Executable file
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
|
Loading…
x
Reference in New Issue
Block a user