Magna Techa
guides and thoughts on technology by Travis Reddell

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:
How to Remount a Drive as Read/Write in Linux
Automatically Mount a Drive when Linux Boots
Linux and Choice
Get the age of a Linux install
The Reason You Hate Other Operating Systems
Text to speech with the Linux command line
Search for a Program with the Command Line
Recording Internal Audio with Linux
Shut Down Linux from the Command Line
Kupfer, a great Spotlight-like tool for Linux

comments powered by Disqus