Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 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.

1  
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
2  
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

1 Answer 1

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.