mirror of
https://github.com/ThunixdotNet/makeuser.git
synced 2026-01-24 13:40:17 +00:00
Added Recovery Account function to makeuser script
This commit is contained in:
@@ -34,3 +34,10 @@ makeuser_no_ansible()
|
|||||||
#If root doesn't have a fediverse account, comment this out
|
#If root doesn't have a fediverse account, comment this out
|
||||||
#sudo toot "welcome new user ~$1!"
|
#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
|
||||||
|
}
|
||||||
|
|||||||
4
makeuser
4
makeuser
@@ -24,7 +24,9 @@ case $1 in
|
|||||||
*)
|
*)
|
||||||
[[ $# -ne 3 ]] && error_exit "not enough args"
|
[[ $# -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
|
#Thunix specific section
|
||||||
currdir=`pwd`
|
currdir=`pwd`
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ case $1 in
|
|||||||
*)
|
*)
|
||||||
[[ $# -ne 3 ]] && error_exit "not enough args"
|
[[ $# -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
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user