How to Create a Sudo User in Debian


Sudo supplies particular privileges to customers to run instructions as some other person. It can use used to permit superuser privileges to a standard person with restrictions. One can configure the sudo to present root privileges to the precise instructions simplest.

This educational helped you to create a brand new person with Sudo privileges, upload an current person to sudo privileges or take away sudo privileges from any account.

Create User with Sudo Access

Use the machine’s default “adduser” command to create a brand new account. As according to present necessities the command syntax will likely be like:

sudo adduser [USER_NAME} [GROUP_NAME] 


  • USER_NAME is the title of the brand new person account.
  • GROUP_NAME Define a bunch title right here to robotically upload person to this staff throughout introduction.

Let’s check out with an actual instance. The following command will create a brand new person tecadmin and upload it to sudo staff.

sudo adduser tecadmin sudo 

In case of person exist already, it is going to merely upload the person to the sudo staff.

Add Existing User to Sudo

You too can use the next command so as to add current customers to staff sudo, the place it is going to get complete sudo privileges.

sudo usermod -aG sudo tecadmin 

This will simply upload tecadmin person to the sudo staff. One can test the similar within the /and so forth/staff document.

Remove Sudo Privileges from User

The following command will take away a person from the sudo staff. This will simply take away the tecadmin person from the sudo staff. It won’t take away the person from the machine.

sudo gpasswd -d tecadmin sudo 

We additionally counsel viewing the /and so forth/assets document and take away any user-specific access.


This educational helped you to offer particular permission to customers the usage of Sudo on a Debian machine. Additionally, this educational will give you permission to permit sudo get right of entry to to the present accounts. Also, take away Sudo privileges from the person.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More