Categories: ErrorhatUbuntu

How to Reset Ubuntu Password

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.

Sponsored

When you’re ready, please continue below

Reset Ubuntu password from the recovery mode

1: Boot into the recovery mode

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…

2: Drop to root shell prompt

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.

3: Remount the root with write access

You need to have write access to the root partition. By default, it has only read-only access.

Sponsored

Use the command below to remount it with write access:

# mount -rw -o remount /

4: Reset username or password

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.

Summary:

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.

Go to Source

Ubuntu Server Admin

Recent Posts

Building RAG with enterprise open source AI infrastructure

One of the most critical gaps in traditional Large Language Models (LLMs) is that they…

7 hours ago

Life at Canonical: Victoria Antipova’s perspective as a new joiner in Product Marketing

Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…

1 day ago

What is patching automation?

What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…

2 days ago

A beginner’s tutorial for your first Machine Learning project using Charmed Kubeflow

Wouldn’t it be wonderful to wake up one day with a desire to explore AI…

3 days ago

Ubuntu brings comprehensive support to Azure Cobalt 100 VMs

Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…

3 days ago

Ubuntu Weekly Newsletter Issue 870

Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…

4 days ago