I'm running in 12.04LTS on a Dell Inspiron Mini 910 - with default specks. I really just need to get this fixed. When I use the sudo passwd root command, it still says I can't change it, the account is unlocked, but when I go to account settings, it seems that I don't have the current password right, because I can't seem to remember it.

I used these in recovery mode:

sudo passwd

su password: joe
Password joe

Enter new UNIX password:

Retype new UNIX password:
passwd: password success

I'm still getting authentication errors, as well as error ID 'password'. I Booted up held shift, and ran in root. But it asks for a password, and I don't know it.

  • I have rewritten my answer, from your edit it looks like you have successfully switched to root. The procedure in my answer should work (it's almost the same as what you show but there are some strange things that make me think you had a typo somewhere). If not, make sure that running whoami returns root. – terdon Feb 25 '14 at 18:33

Based on your edit, it looks like you have actually managed to log in as root. The sequence of commands you are showing does not make much sense (I understand it's hard to get used to the command line, that's not a complaint :) but since you end up with a prompt like this:


you have managed to become root. You can make sure by running the command whoami, it should return root.

Assuming you are indeed root, you can use the passwd command to change your user's password. I will assume your user is joe, run this command:

passwd joe

The whole process should look something like this (the root@ubuntu # just represents your prompt, lines that begin with that represent commands and lines that don't are a command's output):

root@ubuntu # passwd joe
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
root@ubuntu # 

At this point, user joe should have whatever password you just set for him. You should now be able to log in as joe with the new password.

As an aside, when logged in as root, you can become joe without needing a password:

root@ubuntu # su joe
joe@ubuntu $ 
| improve this answer | |
  • I ran this as well, but when I got to user accounts it still says the account is locked, and that the account has no password. So, I need to unlock my root and change the password. However, I do realize that it asks for a current password as well as a new password. When I ran su - it and then password: s1cknasty it said authentication failure – s1cknasty Feb 25 '14 at 15:19
  • @s1cknasty please edit your question and clarify. sudo su - password will ask for your user's password first and then for the root password, if you have not enabled the root account previously you won't be able to do this on Ubuntu. Have you lost the password of your normal user or that of root? – terdon Feb 25 '14 at 15:22
  • I lost my user account password, I have accessed root before, Im just trying to get my authenication password fixed and change that password. Currently, I can not change it, because Im locked out of the user's account settings to change my password – s1cknasty Feb 25 '14 at 15:27
  • @s1cknasty If you've accessed root before, you would have set up a root password and that should allow you to use su (not sudo). I don't understand what you mean by "the account is locked", did you manage to run the two commands I give in my answer? If you can run su correctly, the command password s1cknasty will let you change the password of your account. If not, please give us the error messages you received. – terdon Feb 25 '14 at 15:35
  • Error : Unknown ID 'password' – s1cknasty Feb 25 '14 at 15:42

If you have your normal admin account (first account created when you installed Ubuntu) try this:

sudo su -

This will change root's password.

Best if you want to run under root, just run sudo su - and you will be safer.

The root account is enabled (can't understand why people think is not), but it has a scrambled password from the installation and recommended to work like I mentioned. This is something inspired from another popular OS.

| improve this answer | |
  • Yes, I have accessed root already. Im currently on the main Admin account. I just cant change anything, and I disabled the second Admin account. When I used [link] sudo su - password[/link] it gives me three chances to type in the correct password, but I dont know what it is. After entering it in three times, it says[link]3 inccorrect password attempts[/link] – s1cknasty Feb 25 '14 at 15:13
  • 1
    Please don't use sudo su -, just use sudo -i. – terdon Feb 25 '14 at 15:22

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.