From 473fb677ccba78e5e89ff82ec3da6f99d3ce770d Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 26 Jan 2017 10:58:51 +0100 Subject: [PATCH] Update: maintenance keys belongs to 'pi' user --- clone/clone | 12 +++++++++--- clone/utility/sats-boot.service | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/clone/clone b/clone/clone index 8f9cc8c..a11c882 100755 --- a/clone/clone +++ b/clone/clone @@ -149,6 +149,7 @@ step5(){ echo " (.) emulate \`groupadd ssh-key\`"; echo " - /etc/group"; echo " (.) emulate \`usermod -a -G ssh-key,sats sats\`"; + echo " (.) emulate \`usermod -a -G ssh-key pi\`"; echo " - /etc/group"; cat ./utility/group_append | sudo tee -a /mnt/etc/group > /dev/null; cat ./utility/group_append | sudo tee -a /mnt/etc/group- > /dev/null; @@ -190,12 +191,17 @@ step6(){ # (5) Add maintenance keys # - echo " (.) Add maintenance keys'"; - sudo touch /mnt/home/sats/.ssh/authorized_keys; - cat ./server/maintenance/*.pub | sudo tee /mnt/home/sats/.ssh/authorized_keys > /dev/null; + echo " (.) Add maintenance keys (for 'pi' user)"; + sudo mkdir -p /mnt/home/pi/.ssh; + sudo touch /mnt/home/pi/.ssh/authorized_keys; + cat ./server/maintenance/*.pub | sudo tee /mnt/home/pi/.ssh/authorized_keys > /dev/null; # (6) Set up permissions # echo " (.) Set up permissions"; + sudo chown -R 1000:1000 /mnt/home/pi/.ssh; + sudo chmod 550 /mnt/home/pi/.ssh; + sudo chmod 400 /mnt/home/pi/.ssh/authorized_keys; + sudo chown -R 666:666 /mnt/home/sats/; sudo chmod 400 /mnt/home/sats/.ssh/*; diff --git a/clone/utility/sats-boot.service b/clone/utility/sats-boot.service index fdf865a..f70df75 100644 --- a/clone/utility/sats-boot.service +++ b/clone/utility/sats-boot.service @@ -1,7 +1,7 @@ [Unit] Description=SATS Boot Process Requires=network-online.target -After=network-online.target +After=network-online.target network.target Before=sats-loop.service [Service]