• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Data Recovery Pit

The Data Recovery Expert

  • Best
  • Guides
  • Reviews
Home / Guides

April 5, 2022 Pramesh Khanna

How to Recover Ubuntu Password

Recover Ubuntu Password

Ubuntu 20.04 LTS, codenamed “Focal Fossa”, results from months of efforts from the operating system and has a bunch of new features that amaze its users. You can experience substantial improvements, from boot speed to app appearance to bundled software. However, as with every operating system, some problems remain, such as forgetting the user passwords. In case you have forgotten your Ubuntu password, you can recover it in a handful of ways. However, the guide below will only go over the prime methods to help you out of the shambles. 

It’s normal to forget passwords if you haven’t used Ubuntu in a while. The good news is that you won’t have to reinstall the complete operating system because of it. It’s simple to recover Ubuntu passwords using the command-line interface. This technique of password recovery may appear complicated, but it’s actually relatively easy. It applies for resetting an Ubuntu password in VMware, dual booting, or a single installation. All you need is a bit of time and a few commands to complete the task. Within minutes, you’ll be able to change the root password.

Table of Contents

  • 1. Recovering Password for Ubuntu via Recovery Mode
  • 2. Alternative Way to Access the Ubuntu Grub Menu and Recover Password

1. Recovering Password for Ubuntu via Recovery Mode

Boot into recovery mode through the Grub menu (you can also hold down the “Shift” key or “ESC” key to display the Boot Menu). Now:

  1. Select “Advanced Options for Ubuntu” in the Grub menu.
  2. The option to go to Recovery Mode will appear here. You’ll need to wait here for a few seconds. Next, a screen will appear with different recovery mode options.
  3. Select, “Root – Drop to root shell prompt.” Press the Enter key to select this option. (An option to enter commands will appear at the bottom as soon as you select the root shell prompt option.)  
  4. Now remount the root with write access using the “mount -rw -o remount /” command since the root has read-only access by default.
  5. Use the “ls /home” command to list all the users.
  6. Now, choose the “username” you wish to change or reset the password for.
  7. To alter the password, type the command “passwd username” (When you type your new password, it won’t be displayed on the terminal screen due to the Linux security feature).
  8. The screen will show “Enter new UNIX password:” where you need to type the new password.
  9. Next, the screen displays, “Retype new UNIX password:” Re-type your new password here.
  10. Type “exit” to exit the root shell prompt.

That’s it! You’ll see the recovery mode menu once you exit. From here, you’ll need to select the normal boot option.

Fixing the Authentication token manipulation error

In case you encounter an error while resetting the password, the screen displays the following message:

passwd username
Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged

The error message you’re seeing happens because the file system is mounted with only read access. Change that and remount it using the following command: “mount -rw -o remount /” Now follow the same process to reset the password.

2. Alternative Way to Access the Ubuntu Grub Menu and Recover Password

If you’re having trouble dropping to the root shell and changing your password as we showed above, follow these steps.

  1. Restart your computer. To bring up the Grub menu, press, and hold Shift (if it doesn’t appear automatically). To edit the grub screen, press “E” at the grub prompt.
  2. Find the line starting with Linux and change the “ro” to “rw” and append init=/bin/bash at the end of that line.
  3. Save the changes by pressing “Ctrl+x” and boot. You’ll boot into the Linux kernel with read and write permissions, rather than a graphical user interface, and instead of using the bash shell.
  4. Type the “passwd command” with your username, as shown in the previous method to finish reseting the password.
  5. Exit the Terminal by typing “exit” and type “reboot” or use the shutdown command “shutdown -r now” which will change the password.

Password, Ubuntu

Next Article
How to Recover Deleted Files in Ubuntu
How to Recover Picasa Photos

Primary Sidebar

Author

Pramesh Khanna

Pramesh is a tech expert, written more than 500 data recovery articles for different publications. His experience in a computer shop where he was in charge of recovering files from hard drives introduced him to the world of data recovery.


LinkedInTwitter
Related Posts

Footer

data-recovery-pit-logo
Info
  • About
  • Privacy Policy
  • Terms and Conditions
  • Contact Us
Site
  • Sitemap
  • Services
  • Advertise
  • Disclaimer
  • Facebook
  • Twitter
  • Pinterest

Copyright © 2025 · Data Recovery Pit

This site uses cookies to serve you better. By continuing to use this website, you agree to our cookie and Privacy Policy.