Vultr VPS root password forgot/invalid, what should I do?Reset root password with Linux command

Vultr VPS root password forgot/invalid, what should I do?

useLinuxcommand to reset root password

Vultr VPS provides free snapshots snapshot function, we can easily backup VPS with this quick station.

However, you often encounter a problem:

  • After the snapshot is restored, the VPS root password expires.
  • Under normal circumstances, the root password is the root password of the VPS.
  • In some cases the root password is invalid due to vps system scripts.

Also, if you forgetCWP Control Panelroot password, you can also use the method described in this article to reset the root password.

CentOS 6 Reset root password

Step 1:Click the "View Console" button in the vultr backend panel ▼

Click the "View Console" button in the vultr background panel, the first picture

Step 2:Click ctrl + alt + del in the upper right corner to restart the VPS ▼

Click ctrl + alt + del in the upper right corner to restart the VPS sheet 2

Step 3:You will see a GRUB boot prompt telling you to press any key ▼

Press any key to enter menu 3

You can stop the automatic boot process by pressing any key in just a few seconds.

(If you miss this prompt, you will need to restart the virtual machine)

Step 4:Enter "a" in the grub command line ▼

Enter "a" in the grub command line sheet 4

Step 5:Enter "single" (including spaces)▼

Enter "single" (including spaces) 5th sheet

Step 6:The VPS will restart, and after the prompt # appears, enter "passwd root" ▼

After the prompt # appears, enter "passwd root" Sheet 6

Step 7:Enter a new root password as prompted ▼

Enter the new root password according to the prompt 7th

Step 8:Restart.

CentOS 7 reset root password

Step 1:Click the "View Console" button in the vultr background panel,

Step 2:Then click ctrl + alt + del in the upper right corner to restart the vps

Step 3:You will see a GRUB boot prompt telling you to press any key –

You can stop the automatic boot process by pressing any key in just a few seconds. (If you miss this prompt, you will need to restart the virtual machine)

Step 4:Type "e" in the grub command line
(If you don't see the GRUB prompt, you may need to press any key to start the machine before it boots)

Step 5:Find the kernel line for the grub menu kernel, usually at the beginning of "linux/boot/", add init="/bin/bash" at the end

Step 6:Press CTRL-X or F10 to reboot

Step 7:Type "mount -rw -o remount /"

Step 8:Then enter "passwd" to change the new password.

Step 9:Restart.

FreeBSD reset root password

Step 1:The boot menu has an option to boot into single user mode.

Step 2:Press the key for single user mode (2).

Step 3:At the root prompt, enter "passwd" to change the root password,

Step 4:Restart.

CoreOS reset root password

CoreOS uses SSH key authentication by default.On Vultr, create a root user and password.

If you choose an SSH key when creating the VPS, you can use this SSH key to log in as user "core".

Standard root login can be reset by executing "sudo passwd" as user "core".First log in as "core" using an SSH key.

If you lose your SSH key, then you can log in as the "core" user by editing the grub loader.In these order:

Step 1:Click the "View Console" button in the vultr background panel,

Step 2:Then click ctrl + alt + del in the upper right corner to restart the vps

Step 3:You will see a GRUB boot prompt telling you to press any key –

Step 4:Press "e" to edit the first boot option. (If you don't see the GRUB prompt, you may need to press any key to start the machine before it boots)

Step 5:Click [View Console] to access the console, then click the Send CTRL+ALT+DEL button in the upper right corner.Alternatively, you can click [RESTART] to restart the server.

Step 6:Add "coreos.autologin=tty1" (without quotes) to the end of the line starting with "linux$".

Step 7:Press CTRL-X or F10 to start.When the system starts, you will be logged in as "core".

Step 8:Remember to reset the root password, restart the server after logging in.

Extended reading:

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Vultr VPS root password forgot/invalid, what should I do?Reset Root Password with Linux Commands", it will help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-650.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top