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

Danish Arman picture Danish Arman · Dec 14, 2017 · Viewed 103.7k times · Source

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.

Answer

sanath meti picture sanath meti · Dec 14, 2017

Open file

sudo nano /etc/sudoers

Then add the user below admin user like below syntax.

user_name ALL=(ALL)  ALL