diff --git a/makeuser b/makeuser index be8f23f..744f712 100755 --- a/makeuser +++ b/makeuser @@ -31,6 +31,10 @@ case $1 in *) [[ $# -ne 3 ]] && error_exit "not enough args" + if id $1 > /dev/null 2>&1; then + exit 0 + fi + echo "adding new user $1" newpw=$(pwgen -1B 10) pwcrypt=$(perl -e "print crypt('${newpw}', 'sa');") @@ -38,7 +42,10 @@ case $1 in || error_exit "couldn't add user" echo "sending welcome mail" - sed -e "s/newusername/$1/g" -e "s/newpassword/$newpw/" /usr/local/bin/welcome-email.tmpl \ + sed -e "s/newusername/$1/g" \ + -e "s/newpassword/$newpw/" \ + -e "s/newtoemail/$2/" \ + /usr/local/bin/welcome-email.tmpl \ | sendmail $1 $2 sudoers@tilde.team echo "subscribing to mailing list" diff --git a/welcome-email.tmpl b/welcome-email.tmpl index b335ea4..476c75b 100644 --- a/welcome-email.tmpl +++ b/welcome-email.tmpl @@ -1,3 +1,4 @@ +To: newtoemail Subject: welcome to tilde.team! hey ~newusername, @@ -37,6 +38,10 @@ replacing ctrl-b with ctrl-a. otherwise, you can disable the autolaunch with the byobu-disable command. feel free to holler on the mailing list or on irc if you have any questions or need help! +the expected ssh fingerprint is SHA256:R3qNfKIF3IiXhKCbFX6rCKl73yzexi9Wodsow6XFres +and can also be found in the sshfp dns records. enable VerifyHostKeyDNS +in your ~/.ssh/config to check against that. + we look forward to seeing you around! welcome to the ~team! ~tilde.team admins