Reset Forgotten User Password

Important

This method is only if you forgot your current user password! Changing your current password should be done through the desktop environment.

Warning

Follow this guide at your own discretion because you can break your system attempting any of this.

Edit the command for the latest boot entry|690x351

  1. Reboot your device.
  2. Press Esc on the keyboard to reach the GRUB boot menu.
    a. If you press Esc too many times, you may end up at a grub> prompt.
    b. Return to the boot menu by typing exit and pressing Enter
  3. Edit the last deployment by presssing E on your keyboard.

Boot with init=/bin/bash|689x359

Edit the GRUB prompt and append init=/bin/bash to the line beginning with linux.

Reboot|689x359

Continue boot process with Ctrl+X

Once you are in the GRUB command line:

  1. Temporarily mount SELinux

    mount -t selinuxfs selinuxfs /sys/fs/selinux

  2. Load SELinux policy

    /sbin/load_policy

  3. Enter your new password (i.e. passwd bazzite)

    passwd [INSERT USERNAME HERE]

  4. Sync

    sync

  5. Reboot

    /sbin/reboot -ff

Commands|690x334

Your user password should now be reset.

Thanks to Colin Walters for the solution.