Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux: 'Username' is not in the sudoers file. This incident will be reported [closed]

Tags:

linux

sudoers

After logging into ssh, I got this message:

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

How can I resolve this? I'm connecting ssh to my virtual private server.

like image 421
Danish Arman Avatar asked Dec 14 '17 05:12

Danish Arman


People also ask

How do you fix is not in the sudoers file this incident will be reported?

The error message looks like this: $ sudo -i [sudo] password for linuxconfig: linuxconfig is not in the sudoers file. This incident will be reported. In order to fix the error, all we need to do is add our user to the correct group.

How do you fix username is not in the sudoers file in Linux?

The issue is caused by your user not having sudo access in your system and can be quickly fixed by adding the user to the wheel group using the usermod command or via editing the sudoers file in your Linux system.

How do I fix a sudoers file error?

The result can be an impaired instance that can't run sudo su or commands that require privileged user access. To fix this syntax error, stop the instance, detach its root volume, attach it to a recovery instance, mount the root volume as a secondary volume, and then revert the changes to the sudoers file.


1 Answers

Open file

sudo nano /etc/sudoers 

Then add the user below admin user like below syntax.

user_name ALL=(ALL)  ALL 
like image 64
sanath meti Avatar answered Oct 04 '22 13:10

sanath meti