I use Ubuntu 9.10
I changed my password. After I restarted my machine and tried to do sudo whatever... I got

"username" is not in the sudoer list.

What should I do to get back in there?


On Ubuntu, you need to be in the admin group. If you have left the admin group, then try booting to the recovery console:

  • when booting, hold down the shift key to bring up the grub menu
  • select the second option (which should say "recovery mode" or "recovery console" at the end of the line)
  • then add your user to the admin group again
# usermod -a -G admin your username
  • then reboot again and you should be able to do sudo stuff again.
  • 1
    almost worked for me, I needed to regenrate the root password, as my user has no privileges on the group file. The rest of it, as you wrote. – Itay Moav -Malimovka May 24 '10 at 17:52

You have to check the /etc/sudoers file.

It is worth it to note that you will have to be root in order to read / edit the file. See visudo.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.