I did set my password as I installed Ubuntu some months ago, and all is running flawless up to few days ago. Since then, although I did never change my password, the whole authentication is not working properly anymore:

  • I can log in at start, BUT
  • I can't install updates anymore (I type the password, and I get back the answer "authentication attempt was unsuccessful") and
  • I can't change my password anymore (same answer as above when I try to unlock the user-account)
  • when I'm AFK for more than 10 minutes, come back and the pc is locked, I cannot log in anymore (same as above, I guess, i did not write it down, but he does not get my password anymore)

I read a bit here and there searching for similar problems, and although I kind of believe now that Ubuntu might have more than one password (right?), I still cannot understand why the same password which used to work for everything up to one week ago, is now "half" useless...

thankful for any help to set everything alright again (and to understand whats going on as well), kind regards, Max


First, let's try your account from the console. WRITE DOWN THESE DIRECTIONS BEFORE BEGINNING - you won't be able to read from here once you start.

Press Ctrl-Alt-F1. This will bring you to a text only console. Log in with your username and password. Once you've accomplished that, do sudo -s, and give it your password again. After doing that, press Press Ctrl-Alt-F7. This will bring you back to the usual graphical screen you're used to.

Were you able to log in at the shell? Were you able to successfully sudo to root (did the prompt change to root@yourmachine:~#)?

OK. You've done this, and you cannot log in at all. So, you will need to reset the password for your username. First, try doing CtrlAltT to bring up the Terminal. Type in passwd and hit enter. Will it allow you to change your password? If so, you should be good. If not, you'll need to boot to single user mode in order to reset your password.

If you could not change your password, let's get into Recovery Mode. Reboot the system, and at the GNU GRUB menu, press down arrow, and select (recovery mode) as shown here:

Grub Menu

Now, drop to root shell prompt:

enter image description here

OK, now you'll need to remount your root filesystem read-write, and then you can change your password:

root@yourmachine:~# mount -o remount,rw /
root@yourmachine:~# passwd yourname
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@yourmachine:~# exit

NOTE: you may be confused about what your actual username is - it's not necessarily the same thing you see at the Ubuntu login prompt! For example, I see "Jim Salter" when I log into my workstation, but my actual username is something completely different and much shorter. If your system tells you there is no such user, you can do less /etc/passwd to look for your actual account name - it should be towards the end of the file. Mine looks something like this:

myrealusername:x:1000:1000:Jim Salter,,,:/home/myrealusername:/bin/bash

Once you've successfully changed the password on your account, exit, "resume normal boot", and log in as normal, with shiny new (working!) password.

  • first of all thx for the prompt answer. Here the results: I could neither log in with my username, nor as sudo: "login incorrect"... I noticed he asks for password for anything i write in as username. The header of the text-console shows the version: ubuntu 12.04.1, if it helps... – Massimo Drago Nov 24 '12 at 20:23
  • see above edit - you need to boot into single-user mode, most likely. – Jim Salter Nov 25 '12 at 2:02
  • It did not let me change the password from the terminal, as you predicted. So I went on to the Grub menu. I found the line linux /boot/vmlinuz. Now... excuse me if i am overly cautious, but the line ends this way: – Massimo Drago Nov 25 '12 at 9:36
  • ro quiet splash $vt_handoff – Massimo Drago Nov 25 '12 at 9:39
  • with actually 3 spaces (not 1only 1 as showed above) between "ro" and "quiet splash". Do I leave the part after the $ untouched? or do I remove it? – Massimo Drago Nov 25 '12 at 9:41

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.