How To Reset the root Password on Oracle Linux In Rescue Mode
It is possible to reset the root password systems running Oracle Linux 7 or higher without knowing the current root password by booting the server into rescue mode via systemd.
Boot the server in to rescue mode via systemd using the following procedure, and then use below commands to reset root password:
1) To switch contexts so all the files will be available at their usual locations:
For Oracle Linux 7 do:
# chroot /mnt/sysimage
For Oracle Linux 8 & 9 do:
# chroot /mnt/sysroot
2) To reset the root password for all versions of Oracle Linux, do:
# passwd root
Changing password for user root.
New password: <Enter_new_Password>
Tagged:
0