2017-01-24 17:29:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-01-25 18:52:51 +00:00
|
|
|
# [1] Set random passwords for 'sats'
|
|
|
|
RANDOM_PASS=$(tr -cd A-Za-z0-9_ < /dev/urandom | head -c 256);
|
|
|
|
echo "$RANDOM_PASS\n$RANDOM_PASS\n" | sudo passwd sats;
|
2017-01-24 17:29:16 +00:00
|
|
|
|
2017-01-25 18:52:51 +00:00
|
|
|
# [2] Set random passwords for 'pi' itself
|
|
|
|
RANDOM_PASS=$(tr -cd A-Za-z0-9_ < /dev/urandom | head -c 256);
|
|
|
|
echo "$RANDOM_PASS\n$RANDOM_PASS\n" | sudo passwd pi;
|
2017-01-25 16:29:28 +00:00
|
|
|
|
2017-01-25 18:52:51 +00:00
|
|
|
# [3] Start ssh service
|
|
|
|
sudo systemctl start ssh;
|
2017-01-25 16:29:28 +00:00
|
|
|
|
2017-01-25 18:52:51 +00:00
|
|
|
# [4] Try to install necessary packages
|
2017-01-26 14:40:45 +00:00
|
|
|
sudo apt-get -y install git php5 php5-cli;
|