Magna Techa

Adding a user to sudoers file

"username is not in the sudoers file. This incident will be reported."

Aw. Well if you have root access, here's how to add your user to the sudoers file. This will allow you to simply use sudo instead of su and logging in as root.

su
echo 'username ALL=(ALL) ALL' >> /etc/sudoers

The first command will ask you for the root password. The second command adds username to the sudoers file. Replace username with your actual username.

More posts that you might be interested in:
Useful Commands and Tweaks for a Linux Environment
Nginx and “413: Entity too large.”
Search for a Program with the Command Line
Get a random file from a directory with the Linux terminal
Turn off display from Linux command line
Improving Battery Life in Linux Part 1: PowerTOP
Dell's XPS 13 Developer's Edition: My Missed Opportunity
Text to speech with the Linux command line
Reboot Linux from the Command Line
From Ubuntu to Arch Linux and everything in between

comments powered by Disqus