ubuntu How to Reset Forgotten Passwords in Ubuntu 16.04

Forgot your Ubuntu login password? Well, this quick tip is going to show you how to reset user (or root) password in Ubuntu 16.04 LTS.

It’s easy to change a password in Ubuntu Linux via passwd command. The key is how you can get into the root command console with super user privilege.

1. Boot into root shell:

For those who have not enabled root user, it’s easy to get into the root shell via the recovery mode from Grub boot-loader. To do so:

1. Start your computer, when you’re at Grub boot-loader, select Advanced Options for Ubuntu and then select boot with the recovery mode.

recovery mode

Tip: For single system and single kernel, you may press and hold Shift key to show Grub while starting up.

2. At Recovery Menu, select “Drop to root shell prompt” and hit Enter.

root shell

Hit Enter again or type in root password if enabled, and continue changing your password via the “Reset password” section (see below).

For those who forgot the root password, you can still get into passwordless root shell by adding kernel parameter in boot menu:

1. Boot into Grub menu, and highlight the default Ubuntu entry.

grub menu

2. Press ‘e‘ on your keyboard to edit the boot parameter, then scroll down and add init=/bin/bash in the end of kernel (or linux) line.

edit boot parameter

Then press Ctrl+X or F10 will boot directly into root shell prompt without password.

Reset Password:

Once you’re in root shell, run the commands below one by one to reset forgotten passwords:

1. Remount Ubuntu system with read and write permission:

mount -rw -o remount /

2. Check the username if you forgot it:

ls /home

3. Reset password via command:


or use passwd root to reset the root password.

reset password

Finally run reboot command to reboot or resume normal boot and login with the new password.

0 (0)
Article Rating (No Votes)
Rate this article
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
RHEL: Displaying/setting kernel parameters - ’sysctl’
Viewed 1355 times since Sat, Jun 2, 2018
LUKS dm-crypt/Device encryption GUIDE
Viewed 855 times since Fri, Jul 13, 2018
How to Analyze or Read OS Watcher Output in three easy steps -- With Example ?
Viewed 5495 times since Thu, Jun 21, 2018
Expand or grow a file system on a Linux VMWare VM without downtime
Viewed 835 times since Fri, Jul 27, 2018
Linux 20 Netstat Commands for Linux Network Management
Viewed 461 times since Mon, Sep 21, 2020
Testing TLS/SSL encryption
Viewed 1105 times since Thu, Jan 16, 2020
Linux How to reset a root password on Fedora
Viewed 216 times since Sun, Dec 6, 2020
Top 25 Best Linux Performance Monitoring and Debugging Tools
Viewed 3708 times since Sun, Sep 30, 2018
LVM: Extend SWAP size by growing existing Logical Volume
Viewed 968 times since Sat, Jun 2, 2018
List of 10 Must Know Oracle Database Parameters for Database Administrator
Viewed 14906 times since Thu, Jun 21, 2018