Posts tagged with "change password"

Recovering from a forgotten root password

To perform a system administrator task, you have to know the root password. What happens if you forgot your root password? Not to worry. Just reboot your PC and you can reset the root password by following these steps:

  1. Reboot the PC(select reboot as you log out the of the GUI) or power up a usual.

    Soon you see the graphical boot loader on screen that shows the name of the operating systems you can boot. If your system runs with LILO boot loader, press Ctrl+X and at the boot prompt type linux single and press enter. Then proceed to step 4.

    [ad#squere-ads]

  2. If you have more than one operating system installed, use the arrow key to select linux as operating system, then press the A key.
  3. GRUB prompts you for commands to add to its defualt boot command.

  4. Press the spacebar, type the following, and press enter:
  5. single

    Linux starts up as usual but runs in a single-user mode that do not require you to log in. After linux starts, you will see the following command line prompts that ends with a hash mark (#), similar to the following :

    sh-2.05b#

  6. Type the paswrd command to change the root password as follows:
  7. sh-2.05b# passwd
    Changing password for root user.
    New password:

  8. Type the new root password that you want to use (it doesn’t appear on screen) and then press enter.
  9. Linux asks for the password again, like this:

    Retype new password:

  10. Type the new password again, and press enter.
  11. If you enter the same password both times, the passwrd command changes the root password.

  12. Now type reboot to reboot the PC.
  13. After linux starts, it displays the familiar login screen. Now you can log in as root with the new password

[ad#squere-ads]