Linux menu

Wednesday, September 17, 2014

How To Reset password when boot loader is password protected In Linux


HOW TO RESET A ROOT PASSWORD


If you forget or lose your system’s root password, then do the following to reset it.

Entering recovery mode

While is system is starting up, hold down the ctrl key to see the boot loader menu. After you see the menu do the following:
 Ø  Use the arrow keys to select the boot entry you want to modify.
 Ø  Press ‘e’ to edit the menu.
 Ø  Use the arrow keys to go to kernel line.
 Ø  Press ‘a’ or ‘e’ to append this entry.
 Ø  At the end of the line add word ‘single’ or the number ‘1’.
 Ø  Press Enter to accept the changes.
 Ø  Press ‘b’ to boot this kernel.
Now you will be seeing a root prompt.
Now you can change your system’s root password.  As root, changing password doesn’t ask for your old password.
Run this command:
 root@localhost# passwd


Resetting password when boot loader is password protected

 Ø  Boot form the installed OS CD/DVD.
 Ø  Select “Rescue Installed System”
 Ø  Answer the prompt for language & keyboard.
 Ø  Let the rescue mode mount your file systems in the read/write mode.
 Ø  Press Enter to get the shell prompt.
 Ø  At the prompt, enter the following commands.
# chroot /mnt/sysimage
# passwd
# exit
# exit

No comments: