English Czech
How to Reset the root Password
A root password may be set up while installing Fedora Linux, although it is now suggested to leave the root account locked and use `sudo`. There are two common methods to reset the root password if it is forgotten or lost.
In Rescue Mode
Using a Fedora Live Media (USB/DVD/CD)
How to reset the root password in Rescue Mode
Changing passwords as root will not prompt for the old password.
While booting the system the xref:bootloading-with-grub2.adoc[GRUB2] menu will be displayed. To boot the system into rescue mode using `bash` follow these steps:
Select the boot entry you wish to edit with the arrow keys.
Select the entry you with to edit by pressing *e*.
Use the arrow keys to go to select the line begging with `linux`, `linux16`, or `linuxefi`.
Go the the end of that line and include a space and the following `rw init=/bin/bash`.
[Note] ==== If your disk is encrypted, you may need to add `plymouth.enable=0` ====
Press *Ctrl-x* or *F10* to boot the entry
Run the command:
passwd
You will be prompted to enter the new root password twice.
Restore the SELinux context and permissions with:
touch /.autorelabel
If you do not restore the SELinux permissions, the boot process may fail. You may have to do a hard-reboot and start back at step 1.
Reboot the machine with: