The sudoers file is a file Linux and Unix administrators use to allocate system rights to system users.
How to reproduce it
sudo whoami
# output
<user> is not in the sudoers file. This incident will be reported
Solution
Switch to root
su root
sudo whoami
# output
root
Update the sudoers file – add the user
nano /etc/sudoers
Add user
<user> ALL=(ALL:ALL) ALL
Save changes and exit
su <user> sudo whoami # output root