Update: maintenance keys belongs to 'pi' user

This commit is contained in:
xdrm-brackets 2017-01-26 10:58:51 +01:00
parent 142aaf53a8
commit 473fb677cc
2 changed files with 10 additions and 4 deletions

View File

@ -149,6 +149,7 @@ step5(){
echo " (.) emulate \`groupadd ssh-key\`"; echo " (.) emulate \`groupadd ssh-key\`";
echo " - /etc/group"; echo " - /etc/group";
echo " (.) emulate \`usermod -a -G ssh-key,sats sats\`"; echo " (.) emulate \`usermod -a -G ssh-key,sats sats\`";
echo " (.) emulate \`usermod -a -G ssh-key pi\`";
echo " - /etc/group"; 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;
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 # # (5) Add maintenance keys #
echo " (.) Add maintenance keys'"; echo " (.) Add maintenance keys (for 'pi' user)";
sudo touch /mnt/home/sats/.ssh/authorized_keys; sudo mkdir -p /mnt/home/pi/.ssh;
cat ./server/maintenance/*.pub | sudo tee /mnt/home/sats/.ssh/authorized_keys > /dev/null; 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 # # (6) Set up permissions #
echo " (.) 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 chown -R 666:666 /mnt/home/sats/;
sudo chmod 400 /mnt/home/sats/.ssh/*; sudo chmod 400 /mnt/home/sats/.ssh/*;

View File

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=SATS Boot Process Description=SATS Boot Process
Requires=network-online.target Requires=network-online.target
After=network-online.target After=network-online.target network.target
Before=sats-loop.service Before=sats-loop.service
[Service] [Service]