Root User Issues

If you are having issues with the root user in an Oracle Linux instance on Oracle Cloud Infrastructure, review the following information.

Resetting the Root User Password on Oracle Linux Instances

To reset the password for the root user, complete the following steps:

  1. Connect to the Oracle Linux instance using a console connection:
  2. In Troubleshooting Oracle Linux with Instance Console Connections, follow the steps to boot the instance into maintenance mode.

    When the instance has rebooted, you see the Bash shell command line prompt.

  3. From the Bash shell, load the SElinux policies to preserve the context of the files you are modifying. This step is necessary to sign in to your instance using SSH and the Console.
    /usr/sbin/load_policy -i
  4. Remount the root partition with read/write permissions:
    /bin/mount -o remount, rw /
  5. Reset the password for the root user:
    sudo passwd root
  6. Reboot the instance:
    sudo reboot -f