Resetting Your Root Password (Cloud Server)
Please use the “Print” function at the bottom of the page to create a PDF.
For Cloud Server packages
In this article, we'll show you how to reset the root password of your Linux Cloud Server using Knoppix.
Prerequisites:
You have logged into the Cloud Panel.
The server is powered on.
You are in the Infrastructure > Servers section.
You have created a snapshot of the server.
Downloading the Knoppix DVD
Select the desired server from your list of servers.
Click DVD Drive.
In the Applications tab, activate the Knoppix 9.1 DVD.
Click on Load DVD.
The DVD will now load.
Booting Knoppix from the DVD
Click Actions > Restart.
Select the Software method.
Click Yes.
The Knoppix operating system loads.Click on Actions > Access KVM Console.
The KVM console opens in a new tab and the Knoppix desktop is displayed.
Changing the Password
To start the terminal emulator (Terminator), click the screen icon on the left side of the taskbar.
Please Note
When you hover the mouse cursor over the icon, the program name Terminator is displayed.
The /bin/bash window opens.
To switch to the root user without a password prompt, enter the following command:
:~# su
Create the directory where the volume group should be mounted.
:~# mkdir /mnt/old
To determine the volume group to mount, type the following command:
:~# vgs
The volume group is displayed.
Example:run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
VG #PV #LV #SN Attr VSize VFree
vg00 1 2 0 wz--n- 79.52g 0In the above example, the name of the volume group is vg00. This name may vary depending on the Linux version.
To activate the volume group, enter the vgchange -ay command in the following form:
:~# vgchange -ay NAMEOFTHEVOLUMES
Example:
:~# vgchange -ay vg00
To query information about the existing Logical Volumes, enter the following command:
:~# lvdisplay
Normally, two Volume Groups are displayed. Compare the VSize value that was displayed to you after you entered the vgs command with the LV Size value. The LV Size value is displayed after you enter the lvdisplay command for each existing Logical Volume. Make a note of the path of the Logical Volume whose size approximately matches the VSize value. This path is displayed under the LV Path item.
To mount the detected volume, type the following command:
:~# mount LV Path /mnt/old
Example:
:~# mount /dev/vg00/lv01 /mnt/old
To reset the root password for the Linux operating system installed on the server, you must change the root directory by entering the following command:
:~# chroot /mnt/old
To change the root password, enter the following command:
passwd
To exit the chroot environment, type the following command:
exit
To unmount the drives, enter the following command:
umount -a
Ejecting the DVD
Switch back to the Cloud Panel.
To eject the DVD, click on the DVD drive.
Click on Yes.
The DVD will be ejected.
Restarting the Server
Choose the Software method of restarting again.
Click Yes.
The server will restart.Switch back to the KVM console and log in with the new password.