Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Last night I was working on installing vsftpd on my Ubuntu 12.10 server. I shutdown last night and when I booted up this morning I seemed to have lost the abilities to sudo anything. It just says, "** is not in the sudoers file. This incident will be reported." Now I wasn't messing with any sudo files, just /etc/vsftpd.confg and /etc/shells. So how did I seemingly lose sudo ability? I'm rather new to Linux in general, but I'm picking it up quick.

share|improve this question

marked as duplicate by Eliah Kagan, Mitch Aug 3 '14 at 9:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

can you paste the output of groups <USERNAME> | grep sudo here ? just replace <USERNAME> with your actual username. – Gufran Dec 19 '12 at 18:32
if your not in the sudoers file you could use the rescue mode and put yourself back in. – Goddard Dec 19 '12 at 19:09
@Gufran Nothing printed out when I typed that in with my username. – Gamegoofs2 Dec 19 '12 at 20:44
@Goddard Goddard I'll look into that. – Gamegoofs2 Dec 19 '12 at 20:46
@Goddard It worked! I remember last night I was unknowingly added myself to another group which must have removed me from sudo. I got in through recovery mode and was able to change it. Thanks! – Gamegoofs2 Dec 19 '12 at 21:16
up vote 2 down vote accepted

if your not in the sudoers file you could use the rescue mode and put yourself back in.

IT should be as simple as going into rescue mode and using the root account to add your account to the sudoers file

Here is that info How can I add a new user as sudoer using the command line?

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.