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

AI in 2025: is it an agentic year?

2024 was the GenAI year. With new and more performant LLMs and a higher number…

42 minutes ago

Canonical announces 12 year Kubernetes LTS

Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…

1 day ago

Ubuntu Weekly Newsletter Issue 878

Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…

2 days ago

How your feedback shapes the way we support open source software

At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…

2 days ago

How To Install osTicket v1.14 On Ubuntu 20.04

I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…

3 days ago

How To Install WordPress On Ubuntu 20.04

Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…

3 days ago