Score:0

sudo command throwing 'user is not in the sudoers file'

es flag

I am on user myuser on Ubuntu and it is only assigned to its own group myuser. sudo -i gives:

user is not in the sudoers file

I cannot log in to a wifi because it is asking for a password and myuser password is failing.

There is no admin on my machine, is there a way to add myuser to the other groups without sudo? Is a complete format/reset of the machine necessary?

The os is Ubuntu 22.04.1 LTS

I cannot access Grub recovery mode because I do not have sudo access to change /etc/default/grub file (recovery mode not loading on holding shift key)

raj avatar
cn flag
raj
How come you don't have an user with admin rights?
NotTheDr01ds avatar
vn flag
Does this answer your question? [How do I reset a lost administrative password?](https://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrative-password)
Anthony Kelly avatar
ng flag
What's the output of cat /etc/group | grep sudo?
bcsta avatar
es flag
@AnthonyKelly the output is `sudo:x:27:`
BeastOfCaerbannog avatar
ca flag
Does this answer your question? [How can I add a user as a new sudoer using the command line?](https://askubuntu.com/questions/7477/how-can-i-add-a-user-as-a-new-sudoer-using-the-command-line)
NotTheDr01ds avatar
vn flag
@bcsta Hmmm. I think Recovery Mode is going to be the only option. Did you see [this answer](https://askubuntu.com/a/24024/1165986) that mentioned that it may be the Esc key on UEFI systems? Also, it can be tricky to time the keypress just right - That answer also mentions needing to try it several times.
NotTheDr01ds avatar
vn flag
Also, there's a possibility that another bootloader took its place if you ever dual-booted. Check the BIOS boot order to see if Grub is the default.
muru avatar
us flag
Does this answer your question? [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)
I sit in a Tesla and translated this thread with Ai:

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.