I can login to my Ubuntu 16.04 server no problem with my usual password but when I try to give admin privleges through terminal sudo -s, the password doesn't work. Strange because it always worked. I get the following error:

"Username is not in the sudoers file etc ...."

I did a search and it seems like a common error and recommend that go into recovery mode from grub.


But then there is no Recovery Menu that shows up (DOS window) from the grub recovery mode.

Help please!

1 Answer 1


If the problem is [only] with the sudoers file, you can find help at this Ubuntu help page,


The problem might also be with the /etc/group file, and in that case you can refer to the following link to another question here at AskUbuntu,

How do I add a user to the “sudo” group?

  • Thank you, I have solved it now. Luckily I had another account called test so I was able to log in there and change the sudoers file. Very strange why it went missing in the first place though!
    – peteubuntu
    Nov 23, 2016 at 1:01
  • I'm glad it works now, and thanks for sharing the solution :-)
    – sudodus
    Nov 23, 2016 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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