add ssh fingerprint and to: header to welcome mail

This commit is contained in:
Ben Harris 2020-01-06 14:21:30 -05:00
parent 27bc0aff7a
commit 72129a054c
2 changed files with 13 additions and 1 deletions

View File

@ -31,6 +31,10 @@ case $1 in
*) *)
[[ $# -ne 3 ]] && error_exit "not enough args" [[ $# -ne 3 ]] && error_exit "not enough args"
if id $1 > /dev/null 2>&1; then
exit 0
fi
echo "adding new user $1" echo "adding new user $1"
newpw=$(pwgen -1B 10) newpw=$(pwgen -1B 10)
pwcrypt=$(perl -e "print crypt('${newpw}', 'sa');") pwcrypt=$(perl -e "print crypt('${newpw}', 'sa');")
@ -38,7 +42,10 @@ case $1 in
|| error_exit "couldn't add user" || error_exit "couldn't add user"
echo "sending welcome mail" 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 | sendmail $1 $2 sudoers@tilde.team
echo "subscribing to mailing list" echo "subscribing to mailing list"

View File

@ -1,3 +1,4 @@
To: newtoemail
Subject: welcome to tilde.team! Subject: welcome to tilde.team!
hey ~newusername, 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 byobu-disable command. feel free to holler on the mailing list or on irc if you
have any questions or need help! 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! we look forward to seeing you around! welcome to the ~team!
~tilde.team admins ~tilde.team admins