As the doctor gone rogue

April 14, 2016

How to reset a root password?

Filed under: miscellaneous, ubuntu, Virtual Machine — Tags: , , — hypotheses @ 5:52 am

What do you do when you forget the “root” account password?
Install new OS is not always a good idea. As long as you still have physical access to the computer, it is somewhat possible to try the followings. Depending on whether you are working with Mac or Linux. See the detail and additional reference through the links below.
OsX:
  1. Restart the Mac while holding down the Option key, and double-click the icon for the Recovery partition. …
  2. Choose Utilities > Terminal.
  3. In Terminal, type resetpassword .
Ubuntu:
  1. Reboot your computer.
  2. Hold Shift during boot to start GRUB menu.
  3. Highlight your image and press E to edit.
  4. Find the line starting with “linux” and append rw init=/bin/bash at the end of that line.
  5. Press Ctrl + X to boot.
  6. Type in passwd username.
  7. Set your password.
Advertisements

Create a free website or blog at WordPress.com.