If you are locked out of your CentOS instance and have lost access to the root account, you need to boot into single-user mode and reset the root password. These steps apply to CentOS 6, 7 and 8.
Access the instance console in the Vultr customer portal.
Click the Send CtrlAltDel button on the top right of the web console.
You can also click the Server Restart icon.
Follow the steps below for your version of CentOS.
single
to the end of the line.passwd
and follow the prompts to change the root password.reboot
to reboot the server.ro
to rw init=/sysroot/bin/sh
.chroot /sysroot
.passwd
and follow the prompts to change the root password.reboot -f
to reboot the server.ro
to rw init=/sysroot/bin/sh
.chroot /sysroot
.passwd
and follow the prompts to change the root password.touch /.autorelabel
to force file system relabeling.exit
.logout
.reboot
to reboot the server.