Previous Section  < Day Day Up >  Next Section

Recipe 13.11. Repairing a Lost Root Password

13.11.1 Problem

Oops, you lost your root password.

13.11.2 Solution

No problem whatsoever. Fire up Knoppix and open a root shell. Mount the filesystem containing /etc/shadow, and make it writable (see Recipe Recipe 9.10). Open /etc/shadow in your favorite editor, and find root's entry:


Delete the password hash, which is between the first set of colons:


Now when you start up the system and log in as root, you will not be asked for a password.

13.11.3 Discussion

Don't forget to set a new root password.

This is yet another demonstration that "anyone with physical access to the box owns it." See Chapter 12 for tips on securing the boot process.

13.11.4 See Also

    Previous Section  < Day Day Up >  Next Section