Home » Linux and Unix » Solved: “User is not in the sudoers file. This incident will be reported”

Solved: “User is not in the sudoers file. This incident will be reported”

When you try to install a package on Linux, you may face an error like this:

user@linux-debian-gnu:/$ sudo /usr/sbin/visudo
We trust you have received the usual lecture from the local System Administrator.
It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for user:
User is not in the sudoers file. This incident will be reported.

You need to add your user to sudoers file. In order to do that; login as root and type the following:

echo 'user ALL=(ALL) ALL' >> /etc/sudoers

Note: You must use your own username instead of “user”.

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.

2 thoughts on “Solved: “User is not in the sudoers file. This incident will be reported””

Leave a Comment