Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 the forums for a solution, and I found this thread, 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?

share|improve this question
    
    
@user252617 You Should Read This –  Sagar Apr 28 at 19:05
    
possible duplicate of How do I reset a lost administrative password? –  guntbert Apr 30 at 19:35
    
@guntbert Not a duplicate. The password is fine (he can login) but he isn't in the sudoers file. Different problem. –  Seth May 1 at 2:00
    
@Seth, no - he hast lost access to the administrative account - the account he has access to isn't one. –  guntbert May 1 at 7:15

3 Answers 3

Login 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.

share|improve this 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.

share|improve this answer

It looks like you are not allowed to execute commands as root user. Be sure your user account is in the group "sudo" (cat /etc/group for this).

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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