I recently had to change the distribution of my desktop computer from Ubuntu to the mother distro, Debian. Although many of us say that both distributions are almost the same, it is true that there are small details that make both distributions different and even that some users have problems, as happened to me.
One of the biggest problems I ran into is that Debian does not work the same way as Ubuntu with the sudo program, at least for non-root users.
Sudo is the command used to run commands as superuser. This is necessary to perform tasks such as installing packages, updates, recording changes to certain files, etc. Something important and that in Debian we cannot do it as in Ubuntu but by entering as root user or system administrator.
After the standard installation of Debian 9, Stretch contains sudo installed by default, but it does not consider our user as a user capable of using it, a small problem that has a solution, a simple and fast solution for any user.
First we have to open the terminal and execute the command "su". Once we are as system administrators we have to write the following:
This will show us a configuration file for the sudo command. Now we have to add the following line:
User privilege specification root ALL=(ALL) ALL
And we have to add the following line under root:
<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>NOMBRE-USUARIO ALL=(ALL) ALL
Now we have to save all the content by pressing Control + O and then we exit by pressing Control + X. This Modification can also be done with the Gedit programTo do this, we will change the "nano" command to the "gedit" command after being root users. After this, we restart the equipment so that the configurations are applied and voilaWe already have the sudo command ready to use as if we had an Ubuntu on our computer.