2

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

1 Answers1

1

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.

Jim Salter
  • 4,343
  • 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 02: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 09:36
  • ro quiet splash $vt_handoff – Massimo Drago Nov 25 '12 at 09: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 09:41
  • just do init=/bin/bash rw. You should not need anything else to get into single-user mode. Remember, this is something that only takes effect once - even if you get it horribly, horribly wrong it all goes away as soon as you reboot the computer. – Jim Salter Nov 25 '12 at 14:36
  • I entered the line, went fot ctrl x, text disappeared and nothing happened anymore. Then I tried a second time, screen went black, text scrolled down, with the cursor blinking at the end of the screen. Text towards the end was: "running/scripts/local-premount; local bottom; init bottom " and all ended with ...done. Then come: "/bin/bash: rw: no such file or directory; kernel panic - not syincing: attempted to kill init!". "bash not tainted"; – Massimo Drago Nov 25 '12 at 17:08
  • then some lines, I wrote down some of them: "printK; panict; forget original parent; perf cgroup attach test; exot notify; do exit; .... sys enter do call 0x12/xxxx". It did nothing anymore... but I could normally boot at the next attempt, as you predicted... :-) – Massimo Drago Nov 25 '12 at 17:09
  • The line I changed is the line before the last. The last line start also with init-something, if it helps... – Massimo Drago Nov 25 '12 at 17:10
  • OK, let's try this a little differently. See edited answer, please. We're going to just do "recovery mode" instead. – Jim Salter Nov 25 '12 at 19:07
  • i went fot it, but when I type "passwd myusername" it says, my username does not exist... it does, at least here on the system settings/user account... – Massimo Drago Nov 25 '12 at 19:32
  • I think you're confused about what your username actually is. tail /etc/passwd - you should see your actual username in there, which is very likely something shorter or different from what you see at the graphical login prompt. (For example, I see "Jim Salter" at the LightDM login prompt, but my actual username is something different and considerably shorter.) – Jim Salter Nov 25 '12 at 19:36
  • yes, no idea why it is so though... well, problem solved, thanks a lot Jim Salter :-) do you actually have any idea what could have happened, why the old password did not work anymore, and why the keyring pass still holds? – Massimo Drago Nov 25 '12 at 19:57
  • No idea Max - however, you CAN reset the keyring password now that you know the password to the actual account. Search AskUbuntu, that question (resetting the keyring) has been asked and answered a LOT. :) Glad I could help! – Jim Salter Nov 25 '12 at 20:03