0

I forgot my login password. I've tried to reboot the system but can't get the right menu to pop up. I don't know anything about computers so please share with me. I have Ubuntu version 2.04 I think??? It's installed on an older MacBook pro. I don't want to loose all the data on the laptop. Any help would be greatly appreciated.

1 Answers1

1

There is no Ubuntu 2.04. So assuming you have; 20.04, 22.04, or 24.04, you have to reboot into recovery mode. If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key (Esc key if EFI install) during bootup.

If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.

From the boot menu, select recovery mode, which is usually the second boot option. After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down Arrow to get to that option, and then press Enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

To reset the password, type:

passwd username

where username is the username you want to reset. You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again. Now the password should be reset. Type:

exit

to return to the recovery menu. After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

Rex
  • 1,737