You are on page 1of 2

How to Reset "root" Password with GRUB on Oracle Linux To

(Doc ID 431260.1) Bottom

In this Document

Goal
Solution

Applies to:
Linux OS - Version Oracle Linux 4.4 to Oracle Linux 5.3 [Release OL4U4 to OL5U3]
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Linux x86
***Checked for relevance on 06-Nov-2013***

Goal
If somehow you have lost the password for the system administrator user "root" you will need to
reset it. This document provides a practical method to do that if you have configured system with
the GRUB boot loader during the OS installation.

Solution
It procedure is to boot the system in the "single user" mode and to be able to do that you must be
on the system console. Please follow the steps below:

1. Reboot the system


2. When the GRUB menu is shown with list of kernels to boot or count down for boot kernel is
seen immediately do the following.
3. Use the arrow key and choose the kernel you want to boot
4. Press key a to append kernel arguments before booting
5. Next line will look something like this:

    grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet

6. At the end of the line press space bar once, then add text single or 1:

    grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet single

    or

    grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet 1


7. Then press enter/return, system will start to boot. The esc key will cancel your edit.

8. This will bring you to a shell prompt and now you can use the passwd command to change the
password for the "root" account:

    sh-3.00## passwd


    Changing password for user root.
    New UNIX password:
...
...

After the password is reset type

# reboot

and after system has been completed booting you can logon with the new root password.

You might also like