Wednesday, 8 August 2012

Single User mode for changing root password

Entering into Single User mode for changing the root password

In single-user mode, your computer boots to runlevel 1. Your local file systems are mounted, but your network is not activated. You have a usable system maintenance shell. Unlike rescue mode, single-user mode automatically tries to mount your file system. Do not use single-user mode if your file system cannot be mounted successfully. You cannot use single-user mode if the runlevel 1 configuration on your system is corrupted.
When the first boot screen appears press 'b' before countdown goes to 0 seconds.



Then the another screen will appear and select the line stated “Redhat Enterprize Linux Server –(xxxx)”
 Select that line and press 'e'.


 Then the following screen will appear select the “Kernel /vmlinuz ---XXX”  line  and press 'e'.

Then write the word 'single' after a space at the end of the line

Then press 'enter' button of your keyboard.
Then press 'b'
Machine will now booted into single user mode.

Now type:
Sh-3.1# passwd
And give your password twice
And type 'reboot'
Password will be changed.