I run Ubuntu in a virtual machine and I've managed to reset my password in recovery mode, by editing the parameters according to these instructions on Superuser.com. Summarizing my steps:

I changed ro single at the end of the line beginning with Linux to rw init=/bin/bash, while booting, then using the command passwd <username>, entered the new password twice. The password is reported to be updated successfully.

However, when I try to reboot the system nothing happens. I tried the command reboot, but it does not work. If I type exit I get kernel panic.

Any tips on how to proceed?

  • can you try sudo shutdown -h now and sudo reboot?
    – don.joey
    Jan 5, 2013 at 15:22
  • Thanks. I get "sudo: unable to resolve host (none)" from both of those commands.
    – forumuser
    Jan 5, 2013 at 15:31
  • can you type hostname?
    – don.joey
    Jan 5, 2013 at 15:40
  • hostname gives me "(none)"
    – forumuser
    Jan 5, 2013 at 17:16

1 Answer 1


Try telinit 6 you don't need sudo since your in single user mode.


If it wont reboot using the standard tools there is a way to do it straight through to the kernel, however this does not close file systems nicely.

Found this here

you must activate the magic SysRq option:

echo 1 > /proc/sys/kernel/sysrq

When you are ready to reboot the machine simply run the following:

echo b > /proc/sysrq-trigger

This does not attempt to unmount or sync filesystems, so it should only be used when absolutely necessary..

  • When I do init 6 I get " Failed to connect to socket /com/ubuntu/upstart: Connection refused"
    – forumuser
    Jan 5, 2013 at 17:15
  • @forumuser update answer try this one.
    – squareborg
    Jan 5, 2013 at 17:43
  • I'm afraid I get the same error message
    – forumuser
    Jan 5, 2013 at 17:55
  • @forumuser how strange.... edited again.
    – squareborg
    Jan 5, 2013 at 18:04
  • The echo to /proc/sysrq-trigger sounds the same as pressing ctrl+alt+[key] and pressing keys R E I S U B (with a few seconds between each, all with ctrl+alt) should try to end all processes, sync filesystems (most important), remount as ro, and reboot.
    – Xen2050
    Dec 3, 2014 at 1:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .