Score:0

unable to use sudo. 21.04 I get an error is not in the sudoers file. This incident will be reported

lk flag

I have been working on this computer all day. The hlast thing I did was to add myself to the group dialout. I logged out and came back in. I tested that I had access to the serial port and went to install an app and I got this message " is not in the sudoers file. This incident will be reported." I have no access to anything root related

Nmath avatar
ng flag
*"I have no access to anything root related"* - if this is true then you will not be able to run any commands as root/sudo. You need to be logged into a root account or an account in sudoers to add your user to sudoers.
hr flag
You probably inadvertently removed your user from other supplemental groups (using `usermod -G` in place of `usermod -aG` for example). See [How do I add myself back as a sudo user?](https://askubuntu.com/questions/70442/how-do-i-add-myself-back-as-a-sudo-user)
lk flag
That is it, I did a "groups" and only see the dialout and my usergroup. everything else is gone.
guiverc avatar
cn flag
Be careful with edits to sudoers file, as any error is treated as if it's a EOF (*end-of-file* marker), ie. if you accidentally introduce an error in the file, all subsequent lines will never be used; which is why the `visudo` command exists (it checks for errors before you exit). If you don't have another account with `sudo` rights (or don't have root logins enabled), you can use a *live* media to correct the issue (it's what I'd use on this box, or as my system is dual boot I could correct from the other OS).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.