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:
- Connect to the Oracle Linux instance using a console connection:
- 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.
- 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
- Remount the root partition with read/write permissions:
/bin/mount -o remount, rw /
- Reset the password for the
root
user:sudo passwd root
- Reboot the instance:
sudo reboot -f