Ubuntu – My password can log me in, but nothing else (“user is not in the sudoers file” error when I try)

sudouser-management

I recently got a new user account for Ubuntu 12.04 on Linux after becoming unable to log in to one of my earlier accounts. I can log in to this account easily enough, but when I try to use the password to install software through the Ubuntu Software Center, it reads:

Your authentication attempt was unsuccessful. Please try again.

I tried installing the software through the terminal with this:

sudo apt-get install

But when I entered my password, I got this message:

[username] is not in the sudoers file. This incident will be reported.

I searched here for a solution, and I found the answer here, which told me to open a root terminal. I don't know how to do this, but I found out I could get a root terminal by entering this in a normal terminal:

sudo -i

Upon doing this, I was asked to enter my sudo password, and I got the same message as before. What am I missing or doing wrong?

Best Answer

You can boot into recovery mode, start a root shell from there and add your user account to the sudo group with adduser USERNAME sudo.

Another solution is, once you are in the root shell, to edit the sudoers file as the thread you linked suggests.

See Broke my sudoers password, how do I reset it without using sudo? for details.