Packetwatch.net

Forgotten root password in Red Hat Enterprise Linux



Last modified: Aug. 5, 2008

Contents
1 - Summary
2 - Start single-user mode
3 - Reset root password


1 - Summary

This little guide will show how to reset the root password in case you
forgot it. For this guide to work you will need to be running Red Hat
Enterprise Linux.


2 - Start single-user mode

If you use GRUB, the default boot loader, press any key to enter the menu.
Using the arrow keys select the version of the kernel that you want to edit
and type [A] to enter into append mode.

Press the Spacebar once to add a blank space, then add the word single to tell
GRUB to boot into single-user Linux mode.

grub append> ... single

Press [Enter] and GRUB will boot single-user Linux mode.


3 - Reset root password

Reset the root password and then reboot.
# passwd root
Changing password for user root.
New UNIX password: ********
Retype new UNIX password: ********
passwd: all authentication tokens updated successfully.
# reboot


Last modified: Wed Dec 31 19:00:00 1969 EST
Packetwatch Research 2002-2008.