Quando se tenta utilizar algum comando sudo, algumas vezes, este pode não funcionar dando o erro que é o título deste post. Por exemplo, ao tentar executar o comando:
sudo apt-get update
O erro “rommel is not in the sudoers file. This incident will be reported.” foi lançado, mas agora já aprendi a resolvê-lo:
O arquivo /etc/sudoers deve ser editado, ele tem mais ou menos o formato abaixo:
# sudoers file.
#
# This file MUST be edited with the ‘visudo’ command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
Na seção User privilege specification acrescente o seu usuário, no meu caso, rommel, vai ficar assim:
rommel ALL=(ALL) ALL
Atenção, ACRESCENTE A LINHA, e não substitua!
Pronto, na próxima vez que fizer sudo usando o usuário rommel, não ocorrerá o erro!