Wednesday, October 17, 2018
Home > Linux > User is not in the sudoers file. This incident will be reported

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

User is not in the sudoers file. This incident will be reported, while working with Ubuntu

I could get this error and no other command its allowing me to execute.

Error as shown in image – 1

Image – 1 

Solution:

Login to recovery mode (Click here – How to log in to recovery mode in Ubuntu)

And follow the steps to open Recovery Menu as this has tools which will help to recover the Operating system from error and as we have sudo error we can go and select root Drop to root shell prompt as shown in Image – 2

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

Image – 2

When you get terminal type below command to enable read write so that you can execute commands here

To add the user in the sudoers file please do run below command

NB: here username is the current active user for which you are getting sudo error

let say machine user name is raj then command will be

then you have successfully executed the command and run below command to exit

Now machine will reboot and then login with the same username having sudo error earlier.

Hopefully you will now be able to run sudo commands without any error.

 

You may also like:

Error while installing Microsoft Framework 3.5 service pack 1 in windows 8.1

How to log in to recovery mode in Ubuntu

How to install PHP7.1 and PHP 5.6 in Ubuntu 14

Product Review: Stellar Phoenix SQL Database Repair

#1805 – Column count of mysql.user is wrong expected 45 found 42. The table is probably corrupted

Batch file to switch between different ISP in Windows machine for Local Area Connection and Wireless Area Connection

How to install nginx, mysql, phpmyadmin, php in Ubuntu

How to Restore Database using SQL Management Studio

Seven easy steps to install Maven in Windows 7

Durga Charan Ojha
I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.
https://lifeonnetwork.com/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.