0

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)

bcsta
  • 101
  • 3
  • How come you don't have an user with admin rights? – raj Nov 23 '22 at 15:08
  • 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) – NotTheDr01ds Nov 23 '22 at 16:16
  • What's the output of cat /etc/group | grep sudo? – Anthony Kelly Nov 23 '22 at 16:27
  • @AnthonyKelly the output is `sudo:x:27:` – bcsta Nov 23 '22 at 16:51
  • 2
    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) – BeastOfCaerbannog Nov 23 '22 at 17:24
  • @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 Nov 23 '22 at 17:56
  • 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. – NotTheDr01ds Nov 23 '22 at 17:57
  • 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) – muru Dec 07 '22 at 11:20

0 Answers0