Reset the root password on a linux box
Intro
The following steps were used to successfully reset the root password of a "Fedora 10" machine. In general, can be applied to any linux machine.
The following steps were used to successfully reset the root password of a "Fedora 10" machine. In general, can be applied to any linux machine.
- GRUBWhile booting, after the initial splash and POST screen of the bios, the control transfers to GRUB. If there is just one linux operating system installed, the GRUB screen is bypassed to the booting screen, in that case just keep on pressing or tapping the ESC Button until you see the GRUB Menu.
- Edit Choose the OS you want to boot into and press "e" to edit.
- Edit Find the line that corresponds to kernel, and again press "e". Add the following line to the end of the line.
single init=/bin/bash
Then press enter, and then "b" to boot the OS. After booting you will get a root shell. - Mounting the filesystem in readwrite mode: Type in the following command to remount the filesystem in read write mode.
mount -o remount,rw /
- passwd Next just use the passwd command, and give a new root password, Now that's simple.
- Reboot or init 5
Not doing this step might give the following error when running passwd, passwd: Authentication token lock busy.
评论
发表评论