Oracle Linux: How to Reset or Set the Root (or opc) Password in Oracle Linux 7
Applies to:
Oracle Cloud Infrastructure
Linux OS - Version Oracle Linux 7.x
Linux x86-64
Goal
This article explains how the root password can be reset on Oracle Linux 7.
Solution
1) While booting GRUB 2 Edit Menu Option (by pressing E)
Select the line that starts with linux16**** (or linuxefi**** for UEFI BIOS) and append "rd.break" at
the end of the line.
Example:
linux16 **** … rd.break
2) Press CTRL+X to boot the system
3) Remount the sysroot file system in reading and write mode and then use chroot to get into a
chroot jail:
$ mount -o remount,rw /sysroot $ chroot /sysroot
Use the passwd command in the command line and enter the same password twice to reset the root or opc password:
Tagged:
0