5

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?

4

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.

| improve this answer | |
2

Log in as either root or a user that does have sudo access, then type: visudo and add the user you're having trouble with to the sudoers file.

| improve this answer | |
2

It looks like you are not allowed to execute commands as root user. Be sure your user account is in the group sudo (type id or grep $USER /etc/group to find out).

If it is not, you have to get it in there. Try to launch your system in recovery mode, you should be able to access a single user root shell from there. Then you can type adduser your_username sudo. This should fix the problem.

| improve this answer | |

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.