Wednesday, May 1, 2013

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

If you are not on the "sudoers" list yet, Fedora/Ubuntu will tell you. You will see output like this:

Only the users listed in /etc/sudoers have the permission to use the command "sudo".

To give the sudo permission to a user we need to add the user to the file /etc/sudoers file.

Open the terminal and give the read and write permision to the sudoers file

chmod u+rw /etc/sudoers

Add the line

Here ranga is  the username

under the User privilege specification section.
Save the file and exit, now the sudo command should work for the user which was added in the file.