How to add a user to the sudoer’s list ?
That’s A very common question For a new linux user for overcoming the prblm of restricted access by root.The list of users who hav root access is mentioned in /etc/sudoer file in root direcory. Adding a user to the sudoers list on a fully installed Linux system such as Debian is only possible via the command visudo. Users in the sudoers list are allowed the root privileges to run commands and open files as the root user. This post will help you to add your user in sudoer list by using VISUDO editor.
How to add a user to the sudoers list:
Open the terminal and type ::
# sudo su
Using the navigation keys, navigate to the bottom of the sudoers file which is now displayed in the terminal of current console.
Look for the below given line in the sudoers list file :
root ALL=(ALL) ALL
Add the following code just below the above line with your user_name instead of user:
user ALL=(ALL) ALL
Now press Ctrl+X and press Y when prompted to save ::
That’s it, your new user now has root privileges!