Skip to content

Instantly share code, notes, and snippets.

@abhitechno01
Created August 19, 2019 10:46
Show Gist options
  • Select an option

  • Save abhitechno01/c8a80de8d878db07cc49bdc1638d78ed to your computer and use it in GitHub Desktop.

Select an option

Save abhitechno01/c8a80de8d878db07cc49bdc1638d78ed to your computer and use it in GitHub Desktop.
ubuntu reset user password
Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
You will see a GRUB boot prompt - press E to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)
Find the kernel line (it starts with linux /boot/) and add init=/bin/bash at the end of the line.
Press CTRL+X or F10 to boot.
The system will boot and you will see the root prompt. Type mount -o remount,rw / and then passwd to change the root password and then reboot again.
Source: https://www.vultr.com/docs/boot-into-single-user-mode-reset-root-password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment