Fix Sudoers File in Debian Linux - ‘[user] is not in sudoers file. This incident will be reported.’

This is a fix for the error message ‘[user] is not in sudoers file. This incident will be reported.’ in Debian Linux.

This fix was tested in Debian 8 Jesse however should work in all versions!

  1. CTRL+ALT+F1 to get to terminal
  2. Type in ‘root’ for username and then the password you set during the installer.
  3. Run ‘visudo’
  4. Enter username under sudo. Example:

    ‘[user] ALL=(ALL:ALL) ALL’

(Be sure to use correct formatting as shown in the sudoers file you are editing)

You can also do adduser (user) sudo

I think you can anyway :P been a few months since I had to fix something like that

Or add your user to the sudo group

gpasswd -a USER sudo

Yeah. Just a post-install problem I've had with Debian 8 I thought I'd share my solution to.

Thanks, that's useful to speed up this process!

Another method is to append the user groups,

su
usermod -a USER -G sudo

The real trick is to install Debian without a root password, in which case the new user automatically gets assigned the sudo group.