user-avatar
Today is Friday
November 22, 2024

September 3, 2010

Enter your linux system in single command line mode without knowing the root passwd

by viggy — Categories: linux — Tags: , , , , Leave a comment

So you press ESC before the system boots up, to intercept it, and then you have to “edit the kernel parameters” in that menu there —
* Find the line that looks like:
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
change it to
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash
when you set init=/bin/bash, you should get a PURE COMMAND LINE prompt and your fstab should be bypassed completely.
SO THEN, once you get there, your whole disk will be read only, so you have to do:
mount -o remount,rw /
This will give you read/write permission on root.
Now you can do whatever you want, like changing your root passwd.

Found this here when I was trying to find a solution for one of my friend.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>