This brief tutorial shows users how to easily reset a forgotten user password, including the root user on Ubuntu 17.04 | 17.10 and 18.04 LTS… We’re humans, and we forget stuff… when we do, we tend to go back in time to remember what was forgotten.
The same is true with passwords. We do forgot a lot when it comes to passwords… that’s why there are countless password managers to help us manage our passwords.
Forgetting your Ubuntu desktop or server password may prevent you from logging on physically or remotely. There are tools that may be able to help you recover the password. However, the method below is the quickest and easiest way to do it.
When you’re ready, please continue below
Switch the computer on. Go to Grub menu. Generally, it appears automatically, if not then hold down the shift key until the boot menu appears.
If you are using Oracle VirtualBox or VMWare, you have to hold down the shift key when the logo of Oracle or VMWare appears.
In the grub menu, select the “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…
Now you will be present with different options of recovery mode. Here you need to choose “Root Drop into root shell prompt“. Just press enter key to select this option. Like in the picture below:
You’ll see that when you select the root shell prompt option, an option to enter commands appear in the bottom. This is your root shell prompt and this is where you’ll use the commands to reset the password.
You need to have write access to the root partition. By default, it has only read-only access.
Use the command below to remount it with write access:
# mount -rw -o remount /
Here, you will be presented with root access. Use the following command to list all the users available:
# ls /home
From the previous command choose the “username” for which you want to reset or (say) hack the password. Now, use the following command to reset the password for the selected “username“:
# passwd username
It prompts for a new password. Enter the new password twice:
Enter new UNIX password: Retype new UNIX password:
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 desktop.
This post shows users how to reset a forgotten user password on Ubuntu servers and desktops. It should apply to almost all version of Ubuntu. Follow the steps above to recover your forgotten passwords on Ubuntu 16.04 / 17.10 and 18.04 LTS.
Congratulations! You’ve just learned how to reset or recover forgotten user passwords on Ubuntu
Enjoy!
You may also like the post below:
The post How to Reset Ubuntu Password appeared first on Error Hat.
One of the most critical gaps in traditional Large Language Models (LLMs) is that they…
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…