Root-Passwort reseten

  • Boot from boot.iso, choose Troubleshooting > Rescue a system
  • Mount the system normally (not read-only), i.e. default, OK
  • chroot /mnt/sysimage
  • passwd root
  • reboot
  • Boot with 'init=/bin/bash' argument
    • ListenpunktPress 'e' to start editing.
    • Scroll down to the „linux16…“ or „linuxefi…“ line. This line tells GRUB 2 which kernel to boot.
    • Move to the end of the line. Add the string „init=/bin/bash“ to the end after space.
    • Once you have finished that change, press Ctrl-x to accept the edit, and to boot using that kernel and boot into runlevel 1 (single user mode).
  • Run load_policy to load the installed policy file into the kernel.
    • /usr/sbin/load_policy -i
  • Remount the root filesystem in read-write mode:
    • mount -o remount,rw /
  • Set the new password:
    • passwd root
  • Nur bei aktive SELinux
    • touch /.autorelabel

      Wenn Sie das System das nächste Mal neu starten, wird das Dateisystem für SElinux automatisch neu gekennzeichnet.

  • Run the exec-command to resume the initialization or reboot.
    • exec /sbin/reboot

      oder

      exec /sbin/init