gentoo.LinuxHowtos.org
edit this article
Teaser
:
Content
:
==Recovering the root password== This tip shows you a couple of ways to reset the root password if you've forgotten it. The easiest way is of course to boot off a LiveCD, chroot into the primary hard disk as described in the [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap1 Gentoo Install Guide] and use passwd. If you don't have a LiveCD, or the system doesn't have CDROM drive, you can reboot the system into single user mode to reset the password. Simply pass the options "init=/bin/sh" to the kernel from the bootloader menu. When the system boots it will drop you into a root shell. The disk will be mounted read-only so remount it read-write with mount -o rw,remount /dev/ROOT (be sure to change ROOT to your actual root partition). Edit /etc/shadow and remove the encrypted password. Reset the root password with passwd and reboot the system. You should now be able to login with the new password. From http://www.gentoo.org/news/en/gwn/20040301-newsletter.xml
Note: The changes you made will be manually reviewed for spam before appearing online. This might take a while.
rate this article:
current rating: average rating: 1.4 (116 votes) (1=very good 6=terrible)
Your rating:
Very good (1)
Good (2)
ok (3)
average (4)
bad (5)
terrible (6)
back