English Czech
How to Reset the root Password
Setting up a root password is one of the steps when installing Fedora. If you forget, or lose, the root password, there are two common methods to reset it:
In Rescue Mode
Using a Fedora Live Media (USB/DVD/CD)
How to reset the root password in Rescue Mode
Changing passwords as root does 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:
Use the arrow keys to select the boot entry you want to edit
Press *e* to edit that entry
Use the arrow keys to go to the line that starts with `linux`, `linux16`, or `linuxefi`
Go the the end of that line, add a space then type `rw init=/bin/bash`. If your disk is encrypted, you may need to add `plymouth.enable=0`
Press *Ctrl-x* or *F10* to boot that entry
Run the command:
It will prompt you 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:
/sbin/reboot -f
The system may take a while to boot as SELinux will be relabeling its permissions on the filesystem. If you see the Plymouth boot screen you can press the `ESC` key on your keyboard to view the SELinux progress. Once it is complete, your system is ready and your root password has been successfully changed.