How to reset a forgotten password on Ubuntu easily – Guide

If you haven’t used Ubuntu in a while, it’s only natural that you don’t remember your password. The good news is that you don’t need to reinstall your entire operating system to do this. You can easily recover Ubuntu passwords. The method mentioned here works for resetting an Ubuntu password on VMware, dual boot or single install. All you need is a little patience and a few commands to run. They reset the root password within minutes. If you’ve already lost your password, you’re not the only one. It’s definitely one of the most popular tech support issues people have had over the years. The good thing is that you don’t have to reinstall the entire operating system due to a forgotten password. ..

Ubuntu made it very easy to reset your password if you lost it. Linux users can also reset a regular user’s password directly from the terminal. But what if the superuser (or root user) loses their password? You need to recover lost password before booting into login screen. This allows any malicious user with physical access to your Linux host to take full ownership of your computer.

Reset Ubuntu Password from Recovery Mode

Booting into recovery mode

If you don’t have a grub menu, hold down the shift key or press the Esc key until the boot menu appears.

To boot from a hard drive, press the “h” key to open the boot menu and choose “boot from hard drive.” ..

In the “Advanced Options for Ubuntu” menu, select “Customize your desktop environment”.

To enter recovery mode, press and hold the power button for 10 seconds.

Drop at root shell prompt

Now you will see different options for recovery mode. Here you need to choose “Root – Drop to root shell prompt“. Just press the Enter key to select this option. You will see that when you select the root shell prompt option, an option to enter commands appears at the bottom. This is the root shell prompt and this is where you will use the commands to reset the password. If you have forgotten your password, there are several options available for resetting it. The first option is to enter a new password and then press Enter. The second option is to use the “Reset Password” command which will reset your password without entering a new one. The third option is to use the “Factory Reset” command which will erase all of your data and settings on your device and restore them to their default state. ..

Remount root with write access

mount -o remount,rw /mnt

Reset username or password

usermod -a -G wheel

You will now be able to use the following commands to change your user’s privileges:

usermod -a -G wheel username

chown username.wheel /home/username ..

resetpassword username

The website asks for your new password. Enter the new password twice to confirm it. ..

New UNIX password: Your new UNIX password is:

The new UNIX password is “password.” ..

You have successfully reset your password. Now exit the root shell prompt. ..

If you exit the recovery mode menu and then select the normal boot option, you will be back in the recovery mode where you can access your data and settings.

Possible troubleshooting:

Invalid authentication token. ..

The new UNIX password is “password”. ..

new UNIX password: Remember your new UNIX password?

An authentication token handling error occurred.

The reason for this error is that the file system is mounted with read-only access. To fix the problem, you need to change the access permissions and mount the file system again. ..

Alternative method to reset Ubuntu password

If you are having difficulty logging in to the system, try these steps:

  1. Make sure that you have the correct user name and password.
  2. Verify that you are connected to the network and that your computer is turned on.
  3. Try restarting your computer and logging in again.
  4. If all of these steps fail, contact your system administrator for assistance. ..

Restart the computer by holding down the turn and pressing E.

Linux:

Linux: linux /boot/vmlinuz-3.13.0-desktop-1.mga4 init=/bin/bash

Press ctrl-x to save your changes and reboot. ..

You are now booting into the Linux kernel with read and write permissions, and instead of using a graphical user interface, you will use the bash shell.

To enter your login password, type: passwd If you don’t know the login password, check with ls /home command. ..

Your new password is: Your new password is:

After setting the new password, reboot in terminal or use shutdown command.

Final note

If you have forgotten your password on Ubuntu, this guide can help you reset it easily. In this guide, we will show you how to reset a forgotten password on Ubuntu. If you have any query or question about this article, please do not hesitate to ask us. Also, please share your love by sharing this article with your friends.