Error in Devuan: "... is not in the sudoers file. This incident will be reported" - Solution [with screenshots]

Written by Administrator on Wednesday April 22, 2020

A problem of broken sudo (error: "... is not in the sudoers file. This incident will be reported") which you can meet in Devuan. For example:

user is not in the sudoers file. This incident will be reported

has very simple solution: you have to add user in sudo group. For now user (in my case dima) is not a member of sudo group, that's why I cannot use sudo mode to run commands:

$ su
$ root@computer:/home/dima# usermod -a -G sudo dima


Explanation:

  1. Log as a root
  2. Add user to sudo group.

Parameter -a (append) is very important! In case you forget to use this swich, user will be removed from any groups.

Parameter -G takes a list of additional groups and assign user to them.

Category: linux Tags: Devuan sudo usermod