Procedure: Boot Linux Grub Boot Loader into single user mode
1) Restart the PC,At grub boot screen (after restart),To stop the menu, press ‘Space bar
2) At Redhat Linux line selection mode Press ‘e’.In the 2nd line that means,Select the kernel Press the e key to edit the entry
3) Select second line (the line starting with the word kernel),Press the e key to edit kernel entry so that you can append single user mode
4) Append the letter S (or word Single) or 1 to the end of the (kernel) line,Press ENTER key
5)Now press the b key to boot the Linux kernel into single user mode
6)Single usermode console (sh-3.2 #) will appear & we have to type hare ‘passwd’ & type our desire password and then reboot the PC.
7)reboot the PC.
8)After the reboot you can login with new user name & apssword
prevent policy to access by single user mode
[root@localhost named]greb-md5-crypt
input password here & copy this encrypted password then go to --
[root@localhost named]vim /boot/grub/grub.conf
type here- lock
Password-- (paste here the copied password)
now save & exit
[root@localhost named]sysctl -p