1

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.

http://www.tecmint.com/fix-user-is-not-in-the-sudoers-file-the-incident-will-be-reported-ubuntu/

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

Help please!

1 Answers1

1

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

help.ubuntu.com/community/Sudoers

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?

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • 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 '16 at 01:01
  • I'm glad it works now, and thanks for sharing the solution :-) – sudodus Nov 23 '16 at 04:59