Debian server setup scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DebianServer-Setup/setup-server.sh

29 lines
781 B

#!/bin/sh
# Placeholder
echo "-------------------------------------------------"
echo "Setting Up Server"
echo "-------------------------------------------------"
# Install sudo
apt update
apt install sudo -yy
# Find the standard user you created during installation and make it a variable
user=$(getent passwd 1000 | awk -F: '{ print $1}')
# Echo the user into the sudoers file
echo "$user ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo "-------------------------------------------------"
echo "Installed Sudo"
echo "-------------------------------------------------"
# Install UFW
sudo apt install ufw
sudo ufw allow ssh
sudo ufw enable
echo "-------------------------------------------------"
echo "Setup complete."
echo "-------------------------------------------------"