# Resetting a forgotten CentOS root password

Source: <https://beta.dedicated.com.tr/en/kb/reset-forgotten-centos-root-password>  
Last updated: 2026-11-28

If you have forgotten the root password of your CentOS server, you can reset it from the server console like this:

1. When the GRUB screen appears during boot, press any key to stop the countdown.
2. Select the default boot entry and press **e**.
3. On the next screen, find the line that starts with `kernel` and press **e** while it is selected.
4. Go to the end of the line, add a space, type `single` and press **Enter**. You return to the previous screen.
5. Press **b** and wait for the system to boot.
6. When the system drops to the `#` prompt, type this command and press **Enter**:

   ```bash
   passwd root
   ```

7. Enter your new root password.
8. Type this command and press **Enter** to restart the machine:

   ```bash
   reboot
   ```
