6

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.

  • 1
    can you paste the output of groups <USERNAME> | grep sudo here ? just replace 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
  • Suggestion: use the visudo command to edit the sudoers file. It will check the syntax before it will apply the changes. It will be less likely to lock yourself out this way. – gertvdijk Dec 19 '12 at 22:00

1 Answers1

2

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?

Goddard
  • 4,724
  • 2
  • 33
  • 51