Added link forced

This commit is contained in:
xdrm-brackets 2017-01-22 11:12:10 +01:00
parent 226985f061
commit 433c947332
1 changed files with 9 additions and 9 deletions

View File

@ -117,19 +117,19 @@ step4(){
step5(){
echo "\n>>> [5] Updating users";
echo " (.) Adding user sats-user";
echo " (.) Adding user sats-user";
# shadow
echo " /etc/shadow";
echo " /etc/shadow";
## TODO: Manage default password ##
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";
echo " /etc/passwd";
echo "sats-user:x:666:666:sats-user,,,:/home/sats-user:/bin/sh" | sudo tee -a /mnt/etc/passwd > /dev/null;
echo "sats-user:x:666:666:sats-user,,,:/home/sats-user:/bin/sh" | sudo tee -a /mnt/etc/passwd- > /dev/null;
echo " (.) Removing pi's login password";
echo " (.) Removing pi's login password";
# create temp file without pi's password
#sudo cat /mnt/etc/shadow | sed 's/pi:[^:]\+:/pi:*:/' | sudo tee /mnt/etc/shadow.tmp > /dev/null;
# write original files
@ -154,15 +154,15 @@ step5(){
step6(){
echo "\n>>> [6] Updating groups";
echo " (.) Adding group ssh-key";
echo " (.) Adding group ssh-key";
# group
echo " /etc/group";
echo " /etc/group";
echo "ssh-key:x:555:pi,sats-user" | sudo tee -a /mnt/etc/group > /dev/null;
echo "ssh-key:x:555:pi,sats-user" | sudo tee -a /mnt/etc/group- > /dev/null;
echo " (.) Adding group sats-user";
echo " (.) Adding group sats-user";
# group
echo " /etc/group";
echo " /etc/group";
echo "sats-user:x:666:sats-user" | sudo tee -a /mnt/etc/group > /dev/null;
echo "sats-user:x:666:sats-user" | sudo tee -a /mnt/etc/group- > /dev/null;
@ -242,7 +242,7 @@ step8(){
# (2) Create link in order to be handled #
echo " (.) Create script link to be handled";
#test -e /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service && sudo rm /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service;
sudo ln -s /mnt/etc/systemd/system/autologin@.service /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service;
sudo ln -fs /mnt/etc/systemd/system/autologin@.service /mnt/etc/systemd/system/getty.target.wants/getty@tty1.service;
# (3) Update autologin script #
#echo " (.) Update script to autologin as 'sats-user'";