Added Recovery Account function to makeuser script

This commit is contained in:
Blade of Darkness 2020-01-15 19:16:53 +01:00
parent 2faf2d9d0a
commit a03c58b202
3 changed files with 13 additions and 2 deletions

View File

@ -34,3 +34,10 @@ makeuser_no_ansible()
#If root doesn't have a fediverse account, comment this out
#sudo toot "welcome new user ~$1!"
}
add_account_recovery()
{
sudo mkdir --mode=700 /home/$1/.thunix
sudo echo echo $2 > /home/$1/.thunix/recovery
sudo chmod 600 > /home/$1/.thunix/recovery
}

View File

@ -24,7 +24,9 @@ case $1 in
*)
[[ $# -ne 3 ]] && error_exit "not enough args"
makeuser_no_ansible $1 $2 #adding new user
#adding new user
makeuser_no_ansible $1 $2
add_account_recovery $1 $2
#Thunix specific section
currdir=`pwd`

View File

@ -23,7 +23,9 @@ case $1 in
*)
[[ $# -ne 3 ]] && error_exit "not enough args"
makeuser_no_ansible $1 $2 #adding new user
#adding new user
makeuser_no_ansible $1 $2
add_account_recovery $1 $2
;;