Create A Sudo User

Create A Sudo User In Ubuntu Linux

Insight: How To Create A Sudo User In Ubuntu

In simple term, Sudo user is most powerful user in Linux with all rights. In this post, we are going to show you the method to create a Sudo user in Ubuntu operating system.

How To Create A Sudo User In Ubuntu

Let’s start to create a sudo user in Ubuntu. At first, let’s create a user in Ubuntu with the following  command. Open your terminal and execute the mentioned command to create a sudo user in Ubuntu.

sudo adduser <username>

For example:

 sudo adduser itsubuntu

After running the above command, user along with group under the name of the user and files are also created. You will be asked to input the password along with personal details like name, phone number and else.

After confirmation, new user will be created.

To make sure that new user is created, run the following command:

ls /home/ 

As we have created a new user, It’s time to convert it into a Sudo user. Open the terminal and run the following command.

sudo usermod -aG sudo <username>

Now, you can login into the system by using the new user account with sudo rights. Now, You can verify whether the user has root privileges or not by running the following command:

sudo whoami

Remove User From Sudo Group

Run the following command to remove user from Sudo group:

sudo deluser username sudo

Above command will remove the user named username from the group sudo.

READ More Relevant Stuff:  How To Access Linux Files From Windows 11 [2023]

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *