Difference between revisions of "Linux password recovery rescue mode"

From Ever changing code
Jump to navigation Jump to search
m (Pio2pio moved page Linux password recovery to Linux password recovery rescue mode without leaving a redirect)
 
Line 9: Line 9:
# Enable SELinux relabeling <code>touch /.autorelable</code>
# Enable SELinux relabeling <code>touch /.autorelable</code>
# Exit shell <code>exit</code>
# Exit shell <code>exit</code>
Change target to rescue mode
<source lang=bash>
sudo systemctl rescue
</source>

Latest revision as of 23:15, 21 November 2019

RHEL 8

This process should work for the most of distributions:

  1. Edit kernel boot in Grub by pressing e
  2. ctrl+e go to end of the line remove ro crash and add rd.break enforcing=0
  3. ctrl+x start the system
  4. Remount root fs mount -o remount,re /sysroot
  5. Switch into chroot /sysroot
  6. Reset password passwd
  7. Enable SELinux relabeling touch /.autorelable
  8. Exit shell exit


Change target to rescue mode

sudo systemctl rescue