How Do You Bypass an Ubuntu User Password?

If you are locked out of your Ubuntu user account due to a forgotten or malfunctioning password, you can regain system access by using Ubuntu’s built-in Recovery Mode. This built-in troubleshooting environment allows you to boot into a root-privileged command line where you can change the user’s password without needing the current credentials. This guide walks you through the step-by-step process of accessing the boot menu, dropping into a root shell, and updating the password so you can log back into the system normally.

Step 1: Access the GRUB Boot Menu

To begin the process, you must bypass the standard loading process and access the GRUB boot loader screen.

Step 2: Boot into Recovery Mode

Once the GRUB loader menu appears on the screen, use your keyboard’s arrow keys to navigate the interface.

Step 3: Drop to the Root Shell

The operating system will load a minimal text-based background and present a menu filled with different maintenance utilities.

Step 4: Remount the Filesystem with Write Access

By default, the recovery console mounts the operating system files as read-only to prevent accidental damage. Because a password change requires rewriting system files, you must manually change the permissions.

Run the following command in the prompt to grant write access:

mount -o remount,rw /

Step 5: Update the Account Password

Now that the disk is writable, you can assign a new login password to the specific user account.

Step 6: Reboot into the Desktop Interface

After the terminal outputs a message confirming that the password updated successfully, you can leave the troubleshooting terminal and return to your regular desktop setup.

Run the final command sequence to clear system buffers and restart the machine:

sync reboot -f

The computer will perform a fresh restart, bringing you back to the standard visual login interface where you can sign in using the updated password credentials.