From 868be646b4bfe5253032f03ac8b3a3fe56267cbe Mon Sep 17 00:00:00 2001 From: Sebbbastien Date: Thu, 29 Aug 2013 09:22:36 +0200 Subject: [PATCH] Updating sshd_config for multiple usernames --- dazzle.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dazzle.sh b/dazzle.sh index 09d9ace..c3f5d20 100755 --- a/dazzle.sh +++ b/dazzle.sh @@ -95,6 +95,10 @@ configure_ssh () { echo " PasswordAuthentication no" >> /etc/ssh/sshd_config echo " PubkeyAuthentication yes" >> /etc/ssh/sshd_config echo "# End of SparkleShare configuration" >> /etc/ssh/sshd_config + # If SparkleShare section already exist, we just update user list + else + sed -ri "N;N;N;s/(# SparkleShare\n)(#.*\n)(Match User .*)\n/\1\2\3,$DAZZLE_USER\n/" /etc/ssh/sshd_config + fi sleep 0.5