16 lines
447 B
Bash
16 lines
447 B
Bash
#!/bin/sh
|
|
|
|
# [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;
|
|
|
|
# [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;
|
|
|
|
# [3] Start ssh service
|
|
sudo systemctl start ssh;
|
|
|
|
# [4] Try to install necessary packages
|
|
sudo apt-get install git;
|