Link to home
Start Free TrialLog in
Avatar of amigan_99
amigan_99Flag for United States of America

asked on

Ubuntu 14.04 password lost and can't change boot order

I loaded up a little Intel NUC with Ubuntu 14.04 via a USB drive. I must have messed up the password to the default user because it's not working when the system goes to screen saver mode. I was going to just blast it with a new image. But now it seems to be insisting on booting to the internal hard drive (mSATA) and bypassing the bootable USB. Need help with either recovering the password or getting the thing to boot from the USB instead of the hard drive. Thank you.
Avatar of strivoli
strivoli
Flag of Italy image

Set the BIOS to boot from the USB. If that doesn't work it might be because the USB drive is unbootable. Simply saving data/... on an USB drive doesn't mean it is bootable too.
Ubuntu usually has repair options in the boot menu, from which you can boot into single mode and then change the user password. When booting press ESC to get to the grub boot menu, and then you should be able to select the repair mode.

If there is no such option in the boot menu, press e to temporarily edit the boot menu, then select the line where it says "quiet splash" and behind that type "single". After that you should be able to boot into single mode and change the password.
Try this:

Stop the system at the boot menu
hit 'e' to Edit  the entry

Go down to edit the second line that starts with 'kernel'
hit 'e' to Edit the line

add  init=/bin/sh
to the end of the line
press enter
press 'b' for boot

after the system boots
use the commands
# mount -o remount,rw /
# passwd NameOfYourUser

Type new password.

# mount -o remount,ro /

Reboot system.
Press SHIFT while booting to get in to the Grub menu, choose 'Advanced ..' and then the '... recovery' option. From the recovery menu, choose the 'root' prompt item. Then as root change the password of your user account using 'passwd <useraccount>'. Reboot and logon with your user account.
Avatar of amigan_99

ASKER

Having no luck getting to grub menu. I tried Shift-power on and Esc-power on. Ending up at the gui.
But you can get into BIOS using F2 key?

To get into GRUB menu, just reboot and try pressing SHIFT a few times, instead of keeping it pressed, system may think the keyboard is stuck.
Press esc after powering on, and after post is finished.
Press the appropriate key being shown on screen to enter in BIOS or select boot options and then select the  boot device you want to go with..

Post you can directly modify system's shadow file for removing encrypted password of root else by pressing keys multiple times you need to move at grub menu and then need to try what above had mentioned.

TY/SA
SOLUTION
Avatar of TobiasHolm
TobiasHolm
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Seen those threads as well, what is your NUC device exactly? Does it have another video output than just HDMI? Can you test (maybe with a neighbor or friend) another HDMI display, like a computer monitor? NUC is easy to carry around ;)
The NUC is model DCCP847DYE. F2 got me to bios GUI and in there I saw the USB was no longer checked as a boot device. Not sure why that was the case as I was must have booted off USB originally in order to load Ubuntu. Anyhow things are looking up.
Ok that did it. Thank you. I am re-imaging from boot USB