This repository has been archived on 2023-08-13. You can view files and clone it, but cannot push or open issues or pull requests.
nas-server/setup2.sh

40 lines
1.0 KiB
Bash
Raw Normal View History

2021-11-12 15:53:21 +01:00
#!/bin/bash
# The purpose of this script is to setup our ISO server on a blank Armbian.
# This script is to be run as root.
# This script runs AFTER setup1.sh, which installs OMV and reboots the system
# YOU SHOULD REMOVE THIS SCRIPT AFTER SETUP
# Functions
# Only run if the user is root
if [[ $USER != 'root' ]] ; then
echo "You must run this script as root!"
exit 1
fi
run_directory_path=$(pwd)
# Set parameters
2021-11-12 18:27:14 +01:00
2021-11-12 15:53:21 +01:00
# Main process
# You should comment below what you do not want to happen
2021-11-12 18:27:14 +01:00
2021-11-12 15:53:21 +01:00
echo ""
echo "We're all good here!"
echo "You should now:"
echo "* set $user's password"
echo "* lock root and admin accounts"
echo "* remove $run_directory_path content"
echo "* reboot the SBC"
echo "And perhaps:"
echo "* set htop at your convenience"
echo "* use below commands to edit SSH config:"
echo " sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config"
echo " sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config" # NOTE This one is different from the others, because of OMV setup
exit 0