How to Reset Password on Ubuntu Linux


We want to reset an admin’s password on an Ubuntu system.

Enter boot menu. Boot up the machine, and hold down the left Shift or Esc key.

ubuntu boot menu

Select Recovery Mode. Use the arrow keys to scroll to the first boot option from the top that contains (recovery mode). Hit Enter.

ubuntu recovery mode

Select root. Use the arrow keys to scroll to root -- Drop to root shell prompt. Hit Enter.

The root shell prompt will look like this.

root@ubuntu:~#

List users. If needed, enter ls /home to list all user accounts.

Reset the password. Run passwd username, where username is user account you want to reset. There will be a prompt for a new password. No letters will appear when you type. This is how it should be. Hit Enter each time after you’re finished typing the password.

root@ubuntu:~# passwd username
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ubuntu:~#

Exit to menu. Type exit and hit Enter.

Boot normally. Select Resume Normal Boot and log in with your new password.