Added default .bashrc ssh startup + AUTOLOGIN TO FIX

This commit is contained in:
xdrm-brackets 2017-01-21 18:18:44 +01:00
parent cdb12a374c
commit 8976f3ae7a
1 changed files with 11 additions and 2 deletions

View File

@ -121,8 +121,8 @@ step5(){
# shadow
echo " /etc/shadow";
## TODO: Manage default password ##
echo "sats-user:*:17185:0:999999:7::" | sudo tee -a /mnt/etc/shadow > /dev/null;
echo "sats-user:*:17185:0:999999:7::" | sudo tee -a /mnt/etc/shadow- > /dev/null;
echo "sats-user:$6$k0vFWRoG$bEBdFcFBWw2fLEA.5LsVKOtLWdWSkZMnEikqOG4jHCneRrWEBnEt6.ROe60ggdA7DbdU.l2ZO35WFvi3q6Ays/:17185:0:999999:7::" | sudo tee -a /mnt/etc/shadow > /dev/null;
echo "sats-user:$6$k0vFWRoG$bEBdFcFBWw2fLEA.5LsVKOtLWdWSkZMnEikqOG4jHCneRrWEBnEt6.ROe60ggdA7DbdU.l2ZO35WFvi3q6Ays/:17185:0:999999:7::" | sudo tee -a /mnt/etc/shadow- > /dev/null;
# passwd
echo " /etc/passwd";
@ -209,6 +209,15 @@ step7(){
echo "\nAllowGroups\tssh-key\nPasswordAuthentication\tno" | sudo tee -a /mnt/etc/ssh/ssh_config > /dev/null;
# (8) Set up automatic ssh server at start up #
echo " (.) Trigger ssh server on start up"
sudo touch /mnt/home/sats-user/.bashrc;
echo "sudo service ssh restart" | sudo tee -a /mnt/home/pi/.bashrc > /dev/null;
echo "sudo service ssh restart" | sudo tee -a /mnt/home/sats-user/.bashrc > /dev/null;
sudo chown 666:666 /mnt/home/sats-user/.bashrc;
sudo chmod 755 /mnt/home/sats-user/.bashrc;
echo "<<< done";
step8;