How to add a user to the sudoers list
Believe it or not, this is a fairly common question and in all reality the answer is quite simple. 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 privileges to run commands and as the root user. In the following quick tutorial, we will show you how adding a new sudoer is quickly done.
- Open a Root Terminal and type visudo (to access and edit the list)
- Using the up/down arrows, navigate to the bottom of the sudoers file that is now displayed in the terminal
- Just under the line that looks like the following:
- Add the following (replacing user with your actual username):
- Now press Ctrl+X and press Y when promted to save
root ALL=(ALL) ALL
user ALL=(ALL) ALL
That’s it, your new user now has root privileges!
4 Replies to “How to add a user to the sudoers list”
Indeed Mally!, Wise words! <3
Thanks !! :)
Hey thanks fella.. thats a good suggestion.. Watch out for Mordred, he’s aggro and the crust just pulled Arthur..*push west*
Nice quick tip, I’m always spending too long setting up sudo.
One suggestion is adding authentication. You never know what your co-workers can be up to when you leave your station :).