From 333ec9bb105e09495e4a3725f6c9959d260ef211 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 25 Nov 2020 14:01:31 -0500 Subject: [PATCH] add newline with ssh key this fixes a recurring issue where i expect the newline to already be there. i've added new pubkeys for users and it ends up on the same line, breaking both keys. --- makeuser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makeuser b/makeuser index 136292a..0ea8e10 100755 --- a/makeuser +++ b/makeuser @@ -54,7 +54,7 @@ case $1 in sub_to_list "$1" printf "adding ssh pubkey\n" - printf %s "$3" | sudo tee "/home/$1/.ssh/authorized_keys" + printf "%s\n" "$3" | sudo tee "/home/$1/.ssh/authorized_keys" printf "\nannouncing new user on mastodon\n" /usr/local/bin/toot "welcome new user ~$1!"