Refactor | Add Utils, Firewall & Monitoring

This commit is contained in:
2025-01-23 21:33:30 -03:00
parent d0394bffe1
commit 14480e4def
11 changed files with 204 additions and 129 deletions

19
user/create_user.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
function create_user() {
username = $1
echo "[ USER ]: Starting user setup"
sudo useradd $username
echo "[ USER ]: Set a password for $username:"
sudo passwd "$username"
echo "[ USER ]: User created succesfully"
echo "[ USER ]: Adding user to groups"
sudo usermod -aG sudo $username
sudo usermod -aG www-data $username
sudo usermod -aG docker $username
echo "[ USER ]: User added to the following groupps (sudo, www-data, docker)"
echo "[ USER ]: User setup finished"
}