Root User Issues

Review the following information troubleshoot issues with the root user in an Oracle Linux instance on Oracle Cloud Infrastructure.

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 that are changed. This step is necessary to sign in to the instance using SSH and the OCI 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