Reset root password on Oracle Linux 8
Reset Tips
-
Reboot the system and access the
GRUBboot-loader menu. -
Find the line that begins
linuxand scroll to the very end of the line. -
Add the following parameter:
rd.breakto the end of this line. -
Press
Ctrl -Xto start your system. -
Shell prompt
switch_root:/# -
Type the following commands:
mount -o remount,rw /sysroot
chroot /sysroot
passwd
-> input new password twice.
- Run the following commands to relabel SELinux at reboot.
touch /.autorelabel
exit
exit
- Reboot and login via new password.
Have a good work&life! 2021/09 via LinHong