Password is not working

I just installed Ubuntu 20.04 dual boot onto my Windows 10 computer tonight. The install went smooth, but when it finished up and asked me to restart the system, the password that I entered does not work. I put in a 5 digit pin number w/o letters and selected do not ask for a password. When it restarted, it will accept my password, but it just sits there. If I put the wrong password in it shakes the screen. How can I get past this?

Thanks!
Bob

Hi Mulfred1968,

Welcome to our forums.

Seems like you have an issue with the display manager. Can you login on an alternative terminal with your username/password? You can access one by hitting CTRL+ALT+F5 for example.

Ubuntu has several virtual screens called “terminals”: tty1 is the first terminal, tty2 is the second one, and so on. By default, at the end of the booting process the Ubuntu Linux system runs gdm (Gnome Display Manager), which in turn by default puts the GUI (Graphical User Interface) on tty7 (terminal 7). The login screen where you’re experiencing the issue is at tty7.

Since you mentioned that the login screen does accept your 5-digit numeric password, it seems that the issue is not the password that you’re typing (i.e. the password that you’re typing is correct and the system is accepting it), so the screen problem is likely related either with [1] your user data, [2] your active session data, or [3] the graphics card’s ability to function with the Desktop Environment (in your case, it’s likely the Gnome Desktop Environment).

Therefore, the first thing you need to do is to hold CtrlAltF1 in order to enter tty1 (terminal 1). You’ll then be presented with a login screen. Type your username and press Enter, then type your 5-digit password and press Enter again. Every time when I ask you here to run a certain command, by run I mean type the command and then press the Enter key. If such command happens to ask for a password, then by run I mean type the command, then press the Enter key, then type your password and press the Enter key again.

If your authentication is accepted, there you have the confirmation that your 5-digit password is functional (if it’s not accepted, then you’re gonna have to boot Linux in single user mode, in order to boot Linux with only 1 user - the administrator user named root - and then use such root account to change your user account’s password. You can read more about this here).

The next thing you’re gonna have to try, now, is to add a new user. Let’s say that you decided to create a new user named sandman. In such case, run this command:

sudo adduser sandman

The shell will ask you to type a password and confirm it by typing it again. If you accidentally type something else while you’re typing the password, just press CtrlU and the shell will delete everything that you typed so far, so you can then type the entire password again and confirm it by pressing the Enter key.

It’s also going to ask you to provide a name for such user (you may type e.g. only your first name). The other fields may be left in blank (just press Enter). At the end of the process, type Y and press Enter to confirm that all the information that you provided is correct.

The user sandman is now created with the password that you defined and such user’s home folder is created in /home/sandman/ (type ls -l /home and then press Enter to see it on the list of users’ home folders).

Now it’s time to restart gmd by running this command:

sudo systemctl restart gdm

If the above command doesn’t work, maybe your system is using lightdm instead of gmd. All you have to do is to then run this command, instead of the previous one:

sudo systemctl restart lightdm

As soon as the display manager restarts, it’s going to put you back on tty7. Once you’re back at tty7, select your brand-new sandman user, type its corresponding password and press Enter.

If the login is successful, then everything is ok with the connection between the video display driver and X.org (a display server that runs such driver in order to provide a framework where the Gnome Desktop Environment runs). But if you experience the same problem again, then the video display driver is not working with X.org and this may required a lot of actions that are too extensive to describe here, anyway you may want to take a look at this for some directions.

If the login was successful, copy your files from your former account to your new one. There are many ways you can do this. E.g. open a shell terminal emulation window (CtrlAltT is a keyboard shortcut for that) and run this command:

sudo nautilus /home

*BE VERY CAREFUL* with the above command: it’s going to run Nautilus (your system’s file manager) as root (the system’s user account who happens to have absolute powers/privilege over the system). It means that everything that you destroy inside the Nautilus window will be permanently deleted (it does not go to the trash bin).

Assuming that your problematic user account is sdmann, use this privileged Nautilus root session to access your files in /home/sdmann and copy them to /home/sandman. Do not copy the parent folders such as Downloads, Images, Public etc.: only copy your files inside of such folders and the subfolders inside of them.

After you copy everything that you wanted, close the Nautilus window. Back to the shell terminal emulation window, press CtrlC and then run this command (don’t forget to replace sandman with the name of the user account that you actually created):

sudo chown -R sandman:sandman /home/sandman

The command above will cause sandman to become the new owner of all the files and folders that were copied from the sdmann home folder.

Restart your computer and check if you can still login as sandman. If everything is fine, open a shell terminal emulation window again (CtrlAltT) and then run this command (don’t forget to replace sdmann with the name of the actual problematic user account):

sudo userdel sdmann ; sudo rm -r /home/sdmann

The command above will [1] delete the sdmann user from the system (this is achieved by the command located at the left side of the ; character) and then it will [2] delete /home/sdmann (the home folder of the sdmann user) with everything that’s stored inside of it (this is achieved by the command located at the right side of the ; character).