×

This article covers how you can easily remove or add a new user to your Debian 10 system. One of the most basic tasks that you should know how to do on a fresh Linux server is add and remove users. 

In order to add and delete users on Debian, you need to have sudo rights, or to belong to the sudo group.

To check your sudo rights, run the following command:

$ sudo -v

If no error messages appear, you are good to go, otherwise ask your system administrator to provide you with sudo rights.


How to add a user using useradd ?

Run the following command:

$ sudo useradd <username>

To assign a password to the user, you can use the -p flag but it is not recommended as other users will be able to see the password.

To assign a password to a user, use the passwd command:

$ sudo passwd <username>



This article covers how to add users into the sudoers group. Also you will learn how to edit rules in the sudoers configuration file through the command. You can customize the sudoers file based on the user requirements. Sudo stands for superuser do. Sudo is a command used in Unix-like systems to allow a regular user to execute a program as another user. In most cases, it is the root user.

The sudo command allows authorized users to perform commands as another user, which is by default the root user. 

This option gives you administrator-level permissions to run programs on your machine. It is an alternative to using the su command.



This article covers how to add and remove users in the sudo group to manage the sudo privileges of the users. sudo is a command-line program that allows trusted users to execute commands as root or another user.



This article covers how to create a user with sudo privileges. You can now log in to your Debian server with this user account and use sudo to run administrative commands. Basically, In linux sudo is masterpiece to allow users to execute commands with another user's privileges, default is root user.


How to Create a new user account in Debian ?

Create a new user account using the adduser command. Don't forget to replace username with your desired user name:

$ adduser username


To Add the user to the sudo group

Use the usermod command:

$ usermod -aG sudo username



This article covers how to create a user with sudo privileges. You can now log in to your Ubuntu server with this user account and use sudo to run administrative commands.

Basically, The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. 




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com