I am struggling with how to write this title so that everyone can understand better. This does not apply to OpenVZ under the SolusVM management panel, nor does it apply to XEN, because with these two architectures, you forget to click on the root password directly in the background to reset it. . However, if you have a stand-alone server or KVM installed it step by step, what if you forget it? This article records solutions to similar problems.
A friend who used KVM before said hello to VPS. I forgot the root password. Where can I change it? I generally think that reinstalling the system... Please forgive my ignorance, reinstalling is undoubtedly not the best choice. We can easily reset the root password through VNC connection.
Next, I will just take a VPS to test. This article takes the CentOS5.* system as an example and tests it on two KVM architecture VPS. They are: XSVPS.COM (Kansas) and VPSPLAZA.COM(Singapore)
Suppose we forget the root password. First, log in to the SolusVM management panel. We first perform a restart, and then connect via VNC.
You can click the VNC button directly in the panel, or you can record the VNC information and use the tool. I execute it directly in the background.
passwd01
Pay attention to the above step. After restarting, go to VNC immediately. Move a little faster, because the startup menu will be skipped quickly. When you see the countdown as shown above, press the up and down arrow keys of the keyboard. choose.
The picture below shows the currently available system kernels. After selecting the new line, press "E" on the keyboard to edit.
passwd02
As shown below, select the second line and press "E" to edit it.
passwd03
Add "space single" at the end of the new line. Note that there is a space between single and the previous part.
As shown below, I have framed it in red.
passwd04
After completing the input, press Enter to save, and then press the "B" key to start in single-user mode.
At this time, the system can be logged in directly without entering any password, as shown below:
passwd05
It’s easy here. We can set the root password at will and directly command passwd or passwd root, continuously Enter the password you need to set twice. After restarting the machine, you can log in with the modified password.
The above method is suitable for VPS with KVM architecture and also for independent servers with IPMI management.


Hong Kong/United States/Domestic High Speed ​​VPS

postid
7554

Leave a Reply