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.

SSH Essentials: Working with SSH Servers, Clients, and Keys

SSH (Secure Shell) is a cryptographic network protocol that allows secure communication between two computers over an insecure network. It is commonly used for remote login and command execution but can also be used for secure file transfer and other …

read more

How To Set Up an Ubuntu Server on a DigitalOcean Droplet

Setting up an Ubuntu Server on a DigitalOcean Droplet is a common task for deploying web applications, hosting websites, running databases, and more. Here's a detailed guide to help you through the process. Setting up an Ubuntu server on a DigitalOce …

read more