User in sudo group cannot use sudo command
Since you error message says your user is not in the sudoers file
, could you please check your /etc/sudoers
file, see if there is such a line:
%sudo ALL=(ALL:ALL) ALL
If this line is missing, users in the sudo
group will not be sudoers. Edit the file using visudo
command (checks for correct synthax and locks the file).
You can also try to add a customized line like this:
root ALL=(ALL:ALL) ALL
Replace root
with your username, reboot, and try if it works.
As per your conversation with @steeldriver in the comments, my guess is that your user isn't logged off.
The easiest way to make sure that the supersecretuser
has logged off is to type into terminal, as another user, who
.
When doing so, I get output like this:
mitch@quartz:~$ who
mitch :0 2014-09-08 09:49 (:0)
mitch pts/0 2014-09-08 13:18 (:0.0)
I only see myself. Similarly, typing w
into a terminal shows me who all is logged on and what they're doing:
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
mitch :0 :0 09:49 ?xdm? 29:08 0.11s init --user
mitch pts/0 :0.0 13:18 5.00s 0.06s 0.01s w
You can STOP your other user, (SSU I'll call it) with the following command:
pkill -STOP -u SSU
However, truthfully, the easiest solution would be to just reboot the system if that's possible.