• In the grub menu select actual kernel and type “-e” IMAGE

  • Go to the line with “linux 16” and change ro to rw init=/sysroot/bin/sh”.

before: IMAGE

after: IMAGE

  • Press ctrl+X for starting a single mode session

  • When single mode is started access to the system…:
    chroot /sysroot
    
  • And using passwd command change the root’s password:
    passwd root
    
  • Finally, it is necessary to update SELinux information by createing an empty .autorelabel in /
    touch /.autorelabel
    
  • Exit from single mode session

  • Try to login using a new password

Tags:

Updated: