password does not work for everything "anymore"!
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:
Now, drop to root shell prompt:
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.