Sunday, January 6, 2013

How to reset redhat root password and change the default runlevel.


1. Turn on your machine and wait till you see the Grub menu with count down.
2. Press any key to interrupt the countdown.
3. Move your key pointer to the kernel with the use of arrow key.
4. Once kernel line is highlighted, press e to go to edit the configuration.
5. You will be at the end of the line right after "rhgb quiet". Type 1 after quiet and press enter.
if you want to get a detail diagnostic information, remove the quiet value.

6. Press b to boot the system. This will take you to single user mode with out supplying pw as a root user.
7. at the prompt use passwd command to reset the pw.
# passwd

Note: You will follow same procedure to troubleshoot your system. This is just an example to reset the pw.

If you want to change default run level, simple change the value on /etc/inittab file.
# cat /etc/inittab

id:3:initdefault:

here if you want to change from run level 3 to 5 simply change the value of 3 to 5.

id:5:initdefault:

No comments:

Post a Comment