25.1 C
Cuttack
Friday, March 15, 2024
HomeLinuxUser 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

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

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

mount -o remount,rw /

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

adduser username sudo

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

adduser raj sudo

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

shutdown -r now

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 Ojhahttps://lifeonnetwork.com/
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.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular