Lost Linux root password - Recovery mode and init=/bin/bash fail
Posted
by
Albeit
on Server Fault
See other posts from Server Fault
or by Albeit
Published on 2012-11-30T16:52:13Z
Indexed on
2012/11/30
17:05 UTC
Read the original article
Hit count: 197
I lost/forgot the root password to a server sitting beside me and am trying to reset it. I would rather not have to wipe and re-install or use a Live CD (server is running Ubuntu Server 12.04). What I've tried so far...
1) Boot into "Recovery mode" from Grub2 boot menu then drop into root shell prompt. I am prompted to "Give root password for maintenance". No-go.
2) Change the boot parameters for the main boot option to include "rw" and "init=/bin/bash". When I then boot with Ctrl-X, the screen goes black, and nothing happens (I've waited five minutes). init=/bin/sh and init=/bin/static-sh both do the same thing, while init=/sbin/init boots as normal.
Is there anything else I can try to reset the root password? Thank you!
© Server Fault or respective owner