mirror of
https://github.com/ThunixdotNet/makeuser.git
synced 2026-01-24 13:40:17 +00:00
forward mail to new user too
This commit is contained in:
2
makeuser
2
makeuser
@@ -30,7 +30,7 @@ case $1 in
|
|||||||
pwcrypt=$(perl -e "print crypt('${newpw}', 'sa');")
|
pwcrypt=$(perl -e "print crypt('${newpw}', 'sa');")
|
||||||
useradd -m -g 100 -p $pwcrypt -s /bin/bash $1 || exit 1
|
useradd -m -g 100 -p $pwcrypt -s /bin/bash $1 || exit 1
|
||||||
|
|
||||||
sed -e "s/newusername/$1/g" -e "s/newpassword/$newpw/" email.tmpl | sendmail $2 sudoers@tilde.team
|
sed -e "s/newusername/$1/g" -e "s/newpassword/$newpw/" email.tmpl | sendmail $1 $2 sudoers@tilde.team
|
||||||
|
|
||||||
echo "$3" | tee /home/$1/.ssh/authorized_keys
|
echo "$3" | tee /home/$1/.ssh/authorized_keys
|
||||||
toot "welcome new user ~$1!" ;;
|
toot "welcome new user ~$1!" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user