Use the adduser command to add a new user to your system: adduser sammy Use the usermod command to add the user to the sudo group: usermod -aG sudo sammy
Category: Ubuntu General
Allow a list of IP addresses through the firewall
to allow traffic from 192.168.1.10 and 203.0.113.5, you would run: sudo ufw allow from 192.168.1.10 sudo ufw allow from 203.0.113.5 Allow IP Address for Specific Port (Optional): sudo ufw allow from 192.168.1.10 to any port 80 Reload UFW (Optional): sudo ufw reload Verify the Rules: sudo ufw status
How to Ban Failed login attempt IP
To block IP addresses with several failed SSH login attempts, you can use several methods, with fail2ban being one of the most popular and effective solutions. Using Fail2Ban Step 1: Install Fail2Ban On Ubuntu/Debian: sudo apt update sudo apt install fail2ban Step 2: Configure Fail2Ban Create a local configuration: It’s a good practice to create […]
Install node 20
Step 1: Update the System First, make sure your system is up-to-date: sudo apt update sudo apt upgrade -y Step 2: Add the NodeSource Repository for Node.js 20 Use the NodeSource setup script to add the repository for Node.js 20: (before running following command check it the /etc/apt/sources.list.d does exits) curl -fsSL https://deb.nodesource.com/setup_20.x | sudo […]
Sample script file
#!/bin/bash echo "Hello, World!" ls -l
Shared directory
Summary Create the Folder: sudo mkdir /path/to/your/folder Create Users and Set Passwords: sudo adduser user1 sudo adduser user2 sudo adduser user3 Create a Group: sudo groupadd mygroup Add Users to the Group: sudo usermod -aG mygroup user1 sudo usermod -aG mygroup user2 sudo usermod -aG mygroup user3 Change Group Ownership of the Folder: sudo chown […]