From 3a158091dd0ed25450d0012c37a006a67214eb44 Mon Sep 17 00:00:00 2001 From: beech Date: Sat, 31 Aug 2024 18:02:47 -0500 Subject: [PATCH] Upload --- setup-desktop.sh | 17 +++++++++++++++++ setup-server.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 setup-desktop.sh create mode 100644 setup-server.sh diff --git a/setup-desktop.sh b/setup-desktop.sh new file mode 100644 index 0000000..56e3c8b --- /dev/null +++ b/setup-desktop.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Placeholder + +echo "-------------------------------------------------" +echo "Setting Up Desktop - Installing Sudo" +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 + diff --git a/setup-server.sh b/setup-server.sh new file mode 100644 index 0000000..2b4fb16 --- /dev/null +++ b/setup-server.sh @@ -0,0 +1,29 @@ +#!/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 "-------------------------------------------------" \ No newline at end of file