Install sudo in Debian 10

Debian 10 released. This is great news not only for regular Debian users, but for the entire Linux community. However, if you have installed a distribution, you most likely noticed that a normal user can’t use sudo.

Of course, if you are using Ubuntu or Linux Mint this problem will not arise. In this article we will look how to install sudo in Debian 10.

What is sudo?

Regardless of Linux distribution on PC has different users. Each has certain roles and permissions. For example, you need to install some package in Debian. To perform this operation can only a user with root privileges. Other users have no access to this action.

The sudo utility is included in the set of GNU programs. This is a small application that executes commands with the privileges of another user. As a rule, the “other” is the user root.

By default, this utility is not available in Debian. But if you use Debian on your personal computer, you can easily to install it. However, if you are working with Debian on the server, it is better not to do so. Using sudo you can run commands that a normal user has access. Besides, all operations are not logged in the system log.

Install sudo in Debian 10

First install sudo, but it needs to have access to the root user. This is very important. Open a terminal or connect to the server remotely via SSH and switch to root user:

su

Then enter the root password. Now you can install sudo from the Debian repositories:

sudo apt install

The utility can be installed quickly. After that, edit the file /etc/sudoers, which contains all the configuration of sudo. You can use the editor nano or vim:

nano /etc/sudoers

The file is easy to understand. In the specifications section of the user privileges you will find a line like this:

root ALL=(ALL:ALL) ALL

Under it you need to add your user, and leave the rest the same. For example:

imaverycoolcowboy ALL=(ALL:ALL) ALL

Finally, press the key combination Ctrl+O (to save changes), and Ctrl+X (to exit).
Now you can use sudo.

Source: losst.ru

(Visited 42 times, 1 visits today)