Configure sudo and add user to sudoers group on Debian
In this article you will learn how to configure sudo and add user to sudoers group on Debian. This method will work both desktop and server versions of Debian.
sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser. It originally stood for “superuser do” as the older versions of sudo were designed to run commands only as the superuser. Source: Wikipedia
Installing sudo on Debian
Fire up you terminal and run the following commands as root. You can turn normal user to root on debian by simply using
apt-get install sudo
Configuring your user to sudoers group
Now you have got sudo installed on your system, next thing you must do is to configure your user to be permitted to use it.
Add your user to the sudo group with the following command. Replace “user” with your username without quotes.
adduser "user" sudo
Now you need to open up file /etc/sudoers with your favorite text editor as root. I will just be using gedit since I am using Debian on GNOME 3 desktop.
Add your username under sudo like this:
%sudo ALL=(ALL:ALL) ALL
"user" ALL=(ALL:ALL) ALL
Save and close.
Congratulations. You have just learned how to configure and add user to sudoers group on Debian GNU/Linux. I hope you liked my tutorial and found it useful! Please follow me on social media to keep in touch with my articles! Have a great day!
You might also want to check out these interesting articles on my blog:
Remove all games from GNOME 3 with just one command.
Scan open ports with Nmap and install latest version of Nmap