Reset owner password on Ubuntu 18.04 single-boot Dell laptop

Solution 1:

The steps I had to take to reset my password differ somewhat from all the answers linked in the original post. I start out the same but never see a Recovery Menu screen, never enter "/usr/sbin/usermod -p '!' root", etc. I make changes at the command line but the behavior of my CLI is not predicted in any of the other how-tos I tried.

These steps were taken on a single-boot Dell running only Ubuntu 18.04:

  1. Turn on computer.
  2. Press and hold Esc key when Dell screen appears to enter GRUB (right Shift key didn't work for me; didn't try left Shift key).
  3. Select "Advanced options for Ubuntu".
  4. Press Enter.
  5. Select "Ubuntu ... (recovery mode)". I had four kernels and chose the latest one.
  6. Press "e" for edit.
  7. Navigate to the line that starts with "linux /boot/vmliuz-...". For me that line ends with "ro recovery nomodeset".
  8. Remove the last part of line, "ro recovery nomodeset", and replace it with "rw init=/bin/bash". (Thanks to faqforge website for making this step clear.)
  9. Press F10 to reboot the machine.

Here's where I will switch to narrating my experience in the first person rather than prescribing what others should do. I'm not sure why I never see the Recovery Menu at this stage that most answers indicate, or why my command line looks and behaves as it does, but in the end this worked for me where other checklists didn't. Maybe it will work for you too.

After a few seconds the boot process stops and displays this prompt:

root@(none):/#

I start typing "mount -o remount,rw /" but can only type part of the command before the system takes control and outputs this:

enter image description here

The cursor is dangling there, not yet back to a prompt, so I finish typing the command and hit Enter. The output looks unpromising --- it's got the word "errors" in it --- but I am returned to the prompt.

I try again and this time am able to complete the command, "mount -o remount,rw /". I press Enter and see the same output.

enter image description here

But I'm at a new prompt so I figure what the heck, let's try "passwd".

I enter "passwd my_user_name" and press Enter.

And lo and behold, I am prompted for my new password. I enter it, reenter it, and joy of joys, there's a message of success.

enter image description here

Back at a new "(none)" prompt, I type exit and hit Enter. From some checklists I tried, this is supposed to take me back to the Recovery Menu, but since I didn't see that screen on the way in it's probably asking too much to be taken "back" to it now :)

The boot process picks up for a few seconds, then gets hung up here:

enter image description here

After waiting a while, with no options I do a hard power down, figuring it's 50/50 if my new password survives.

On restart I let boot go thru the normal process. It takes longer than usual, but eventually gets to the gui log in screen. I enter my new password and ...

This immovable modal pops up: "Enter password to unlock your login keyring. The password you use to log in to your computer no longer matches ...."

enter image description here

Have I gotten this far only to be denied? I try my new password but of course it is not correct. I try a few more but of course they fail as well, b/c I don't know my old password! Now what?

And then I see it. A Cancel button, right there in the dialog box. I press it and voila, I'm in! Later I'll look into what the "login keyring" is, but for now I'll consider that the password issue is fixed. Hope this helps someone else out there!