Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
49
rated 0 times [  49] [ 0]  / answers: 1 / hits: 128728  / 2 Years ago, wed, june 29, 2022, 2:15:34

I was trying to install some software/edit files with my main username(not root)
But I got this error [X] is not in the sudoers file. This incident will be reported.

I tried to edit the /etc/sudoers file by using sudo and su username but I got the same error!



How I'm supposed to add my username tosudoers file while I cant access it anyway?

I also tried to follow this guide here.



is the guide says, when booting 2 Operating systems(that's my case), then selecting Ubuntu, a menu will let you choose to start normally/open recovery mode/etc, but it's not happening for me, even if I hold shift no menu will pop up.



I installed Ubuntu by using Wubi and my Ubuntu version:12.04 LTS.


More From » boot

 Answers
2

Open a Root Terminal and type visudo (to access and edit the list).



Navigate to the bottom of the sudoers file that is now displayed in the terminal.



Just under the line that looks like the following:



    root ALL=(ALL) ALL


Add the following (replacing user with your actual username):



    user ALL=(ALL) ALL


Now save the file. The procedure for this will depend on your editor:




  • nanoCtrlO then Enter, then CtrlX to exit

  • vim:wq


[#37576] Thursday, June 30, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
imonove

Total Points: 82
Total Questions: 113
Total Answers: 106

Location: Saint Vincent and the Grenadines
Member since Wed, Nov 3, 2021
3 Years ago
;