How To Create A New Sudo Enabled User on Ubuntu

To create a new user with sudo privileges on Ubuntu, you can follow these steps:

  1. Connect to your Ubuntu server: You can connect via SSH or access the terminal directly if you're on the machine.
  2. Open a terminal: You can do this by pressing Ctrl + Alt + T or searching for "Terminal" in the application menu.
  3. Create the new user: Use the adduser command to create a new user. Replace newusername with the desired username.

                    
                        sudo adduser newusername
                    
                

    You will be prompted to set a password and enter some additional information about the user. You can press Enter to leave any of these fields blank if you wish.

  4. Add the new user to the sudo group: By default, the first user created during Ubuntu installation has sudo privileges. You can grant sudo privileges to the new user by adding them to the sudo group.

                    
                        sudo usermod -aG sudo newusername
                    
                

  5. Verify sudo privileges: You can switch to the new user and verify that they have sudo privileges by running a command with sudo.

                    
                        su - newusername
                        sudo ls /root                    
                    
                

    You will be prompted to enter the password for the new user. If everything is set up correctly, you should see the contents of the /root directory.

That's it! You've successfully created a new user with sudo privileges on Ubuntu. You can now use this user account to perform administrative tasks on the system.

How To Open a Port on Linux

Opening a port on Linux involves configuring the firewall to allow traffic through the specified port. Here's a step-by-step guide to achieve this, assuming you are using ufw (Uncomplicated Firewall) or iptables for managing your firewall settings. u …

read more

Troubleshooting Latency Issues on App Platform

Troubleshooting latency issues on an app platform can be complex, involving multiple potential causes across the network, server, application code, and database. Here’s a structured approach to identifying and resolving latency issues. Identify …

read more