LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RHEL 6 Root user password problem (https://www.linuxquestions.org/questions/linux-newbie-8/rhel-6-root-user-password-problem-944747/)

Albkane 05-13-2012 12:20 PM

RHEL 6 Root user password problem
 
I installed RHEL6 on my laptop but I cannot remember the root user password. How can I bypass it and create another one? Thank you.

dimitrio 05-13-2012 12:35 PM

36.1.1.3. Root Password
What can you do if you forget your root password? To reset it to a different password, boot into rescue mode or single-user mode, and use the passwd command to reset the root password.
36.1.2. Booting into Rescue Mode
Rescue mode provides the ability to boot a small Red Hat Enterprise Linux environment entirely from CD-ROM, or some other boot method, instead of the system's hard drive.
As the name implies, rescue mode is provided to rescue you from something. During normal operation, your Red Hat Enterprise Linux system uses files located on your system's hard drive to do everything — run programs, store your files, and more.
However, there may be times when you are unable to get Red Hat Enterprise Linux running completely enough to access files on your system's hard drive. Using rescue mode, you can access the files stored on your system's hard drive, even if you cannot actually run Red Hat Enterprise Linux from that hard drive.
To boot into rescue mode, you must be able to boot the system using one of the following methods[12]:

By booting the system from a boot CD-ROM or DVD.
By booting the system from other installation boot media, such as USB flash devices.
By booting the system from the Red Hat Enterprise Linux installation DVD.

Once you have booted using one of the described methods, add the keyword rescue as a kernel parameter. For example, for an x86 system, type the following command at the installation boot prompt:

linux rescue


FROM

http://docs.redhat.com/docs/en-US/Re...escuemode.html

zXi 05-14-2012 02:49 AM

Long answer short, when you see the grub screen shouting at you "RedHat Linux 6.0 blah blah blah" in a redscreen, press down arrow, now you will be able to stop the count down.

Now, press "e" for editing, use your cursor to go to the last word in the selected grub. Provide a space and type "single" now, press enter and press "b"

you will be now in single user mode.

type passwd root
and give your new password. "remember your password this time, if not dont worry, repeat the steps again :P "

HTH,
zXi


All times are GMT -5. The time now is 12:56 AM.