password doesn't work in GUI or command line

Asked by Dustin Raymond Leonard

My computer is stuck in a GUI log in loop. I enter the correct password but it just comes back to the original screen after I press enter to log in. I tried changing my password several times but that didn't work even though my password was successfully changed. My password won't work in the command line either. So, my password doesn't work in the GUI or the command line.

When I go to the command line either via booting into recovery mode and then dropping to root shell prompt, or by pressing ctrl+alt+F2 in the GUI, after I enter a command the next line will ask me for my password but then when I enter my password, it says "Login incorrect".

 The method I used to change the password was:
mount -o remount,rw /
chmod 640 /etc/shadow
sudo passwd USER

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Dustin Raymond Leonard
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Please clarify, what is the effect of "My password won't work in the command line"?
Do you get a message that the password is wrong, or what exactly is happening?

How did you change the password if you cannot log in?

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

Maybe you have wrong keyboard settings in the GUI.

Can you log in from the welcome screen as guest?

Revision history for this message
Dustin Raymond Leonard (dustinleonard135) said :
#3

I already checked the keyboard settings and they are correct. No, i can't log in from the welcome screen as a guest.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Why not?
Did you configure your system not to allow a guest login, or does it fall back to the welcome screen also for the guest session, or ...?

Revision history for this message
Dustin Raymond Leonard (dustinleonard135) said :
#5

There is an option to login as a guest from the gui welcome screen, but it loops back to the welcome screen in the same way that logging in as an administrator does.

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Ok, in that case it probably is not a problem of the password, but a general problem that starting the desktop environment fails, kicking you back to the welcome screen.

Can you login with your username (and password) in a virtual console (ctrl-alt-F1 etc.)?
(In case that you don't know, to return to the graphical environment use ctrl-alt-F7.)

Revision history for this message
Dustin Raymond Leonard (dustinleonard135) said :
#7

When I enter ctrl-alt-F1 and enter a command, it will then ask for my password. But, after I enter the correct password, the words "Login incorrect" appear which is the same thing it does from the root shell prompt when I boot into recovery mode and try to enter a command there.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

What you write does not make sense to me.

When pressing ctrl-alt-F1 you should see a welcome screen (character-based) asking for the username, and after typing it in and hitting the enter key it will ask for the password. You cannot enter commands before you have logged in.

And in root command mode you should never be asked for a password.

Revision history for this message
Dustin Raymond Leonard (dustinleonard135) said :
#9

I did not realize that the welcome screen after pressing ctrl+alt+F1 was asking for my username. I thought it was asking for a command. That helps a lot. After I entered my user name it did accept my password and I was able to enter commands.

Thank you so much for your help.