Thursday 20 February 2014

Reset Linux root user Password

Reset Linux root user Password

Method 1
1. Boot the computer with Linux Installation CD.
2. Enter into Linux Rescue mode by enering the following command in boot screen. boot: linux rescue
3. When the shell prompt appears, enter the following commands to change root password.

$ chroot /mnt/sysimage
$ passwd

Method 2

1. When you see the grub screen press 'e' on linux which contains the word 'kernell' press 'e'
2. Go to end of that line and write 'linux single'
3. Then press 'esc' twice and press 'b' to reboot the system
4. Now wait for the prompt and type the following command to reset the password for root.

#passwd root

The above steps will prompt you to enter your new password.

 Forgot root Password Linux?

   1. Select the kernel  ( reboot the linux server , press Down arrow key)
   2. Press the e key to edit the entry
   3. Select second line (the line starting with the word kernel)
   4. Press the e key to edit kernel entry so that you can append single user mode
   5. Append the letter S (or word Single) to the end of the (kernel) line
   6. Press ENTER key
   7. Now press the b key to boot the Linux kernel into single user mode
   8. At prompt type passwd command to reset password:

No comments:

Post a Comment