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:
- 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+Xand at the boot prompt type
linux singleand press enter. Then proceed to step 4.
- If you have more than one operating system installed, use the arrow key to select linux as operating system, then press the A key.
- Press the spacebar, type the following, and press enter:
- Type the
paswrdcommand to change the
rootpassword as follows:
- Type the new
rootpassword that you want to use (it doesn’t appear on screen) and then press enter.
- Type the new password again, and press enter.
- Now type reboot to reboot the PC.
GRUB prompts you for commands to add to its defualt boot command.
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 :
Changing password for root user.
Linux asks for the password again, like this:
Retype new password:
If you enter the same password both times, the
passwrdcommand changes the
After linux starts, it displays the familiar login screen. Now you can log in as
rootwith the new password