How to fix “username is not in the sudoers file. this incident will be reported in Ubuntu”. This tutorial explains how to fix username is not in the sudoers file for Ubuntu Systems.
When you get the error message, ‘username is not in the sudoers file’, it means that the user sourcedigit is not present in the sudoers file. You must be aware that the sudoers file is a file that defines both user and user group privileges for sudo-related tasks on your system.
Also you get the error message ‘This incident will be reported’. It means that for this error incident, Linux system will create a report of this failed sudo incident.
You can fix this by adding the username to the sudoers file.
First, run the following command to switch to the sudo user:
$ su root
Now edit the sudoers file using nano editor.
# nano /etc/sudoers
Now add a line under the user privilege specification in the sudoers file:
# User privilege specification root ALL=(ALL:ALL) ALL sourcedigit ALL=(ALL:ALL) ALL
Now save these changes and exit, press CTRL+X to exit and Y to save, and finally Enter.