This post shows students and new users steps to easily reset a forgotten password, including the root user on Ubuntu Linux.
Forgetting your Ubuntu desktop or server password may prevent you from logging on physically or remotely.
Learning how to reset forgotten passwords on Ubuntu Linux is essential because forgetting your password can prevent you from logging in physically or remotely to your Ubuntu desktop or server.
This can cause a significant inconvenience and may even lead to data loss. Therefore, knowing how to reset a forgotten password is crucial for Ubuntu Linux users to regain access to their system and data quickly and safely.
Additionally, this knowledge can help troubleshoot scenarios and manage user accounts on Ubuntu Linux.
To reset a user or root password, turn on the desktop or server and begin pressing the Esc key or Shift on your keyboard. When you turn, push the power button to display the Ubuntu boot menu.
If your timing is wrong and you miss the boot menu, you’ll have to restart the machine and try again until you see the screenshot below.
On the menu, select *Advanced options for Ubuntu.

Next, select *Ubuntu, with Linux.x.x-generic (recovery mode). Select the recovery mode for the same Grub version as the default. They both should have the same version number.

Next, use the scroll key, scroll down on the list, select root as shown on the screen below, and press Enter.

Next, run the commands below to mount the shell with read/write permissions.
mount -rw -o remount /
After running the above commands, the shell should be remounted with read/write permissions. Now, you can run limited commands, including password change commands for the user and root.
To reset a user password, run the commands below, replacing the username with the actual account name or the user.
sudo passwd username
When you run the above commands, you’ll be prompted to create and confirm a password for the account name you mentioned. Create it, and you’re done.
Next, type reboot to restart the desktop or server and begin using the new password you just created.
This is how one resets a user or root password on Ubuntu servers and desktops.
Conclusion:
This post showed you how to reset forgotten passwords on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.
Leave a Reply