Sooner or later, if you use Linux and you prefer Terminal to GUI you will stumble on this message:
Username is not in the sudoers file. This incident will be reported
The first thing to clarify is that the “incident” will never be reported outside your computer but in the auth.log file. But if you have previously configured your Linux OS to send these kind of logs to you by email, you receive an alert about.. your own activity with sudo…
In any case, to solve the above mentioned specific sudo matter, use Terminal and type:
sudo gedit /etc/sudoers
At this point the text file “sudoers” will be opened and you will be able to modify it using e.g. gedit.
Obviously you can use another text editor you prefer as, for example, nano. In this case the command will be:
sudo nano /etc/sudoers
Now you have to peer into the text and find the “#User privilege Specification” section and add the command:
your-username ALL=(ALL:ALL) ALL
where ALL=(ALL:ALL) ALL stands for: allow the specific user (your-username) to access all the terminals, as if he/she were any other user, and allow him/her to execute the full range of commands.
And you will obtain something similar to this:
# User privilege specification root ALL=(ALL:ALL) ALL your-username ALL=(ALL:ALL) ALL
Try it! (..if you need…)