Reset Your Root Password (Cloud Server and vServer)
For Cloud Server and Virtual Private Server (VPS)
In this article you will learn how to reset the root password of your 1&1 Cloud Server Linux using Knoppix.
Requirements:
You are logged in to the Cloud Panel.
The server is powered on.
You are in the INfrastructure > Server section.
You have taken a snapshot of the server in question.
Change the Password
To start the Terminal Emulator, click on
the bottom right corner of the task bar. The LXTerminal window opens.
To switch to the root user without a password prompt, enter the following command:
:~# suCreate the directory where you want to mount the Volume Group
:~# mkdir /mnt/oldTo 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 example above, the volume group name is vg00. This name may vary depending on the Linux version.To enable the Volume Group, type the vgchange -ay command in the following form:
:~# vgchange -ay NAME_OF_THE_VOLUMEExample:
:~# vgchange -ay vg00To get information about the existing logical volumes, type the following command:
:~# lvdisplay
Usually two volume groups are displayed. Compare the VSize value displayed after you entered the vgs command with the LV Size value. The LV Size value will be 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 LV Path.To mount the determined volume, enter the following command:
:~# mount LV Path /mnt/old Example:
:~# mount /dev/vg00/lv01 /mnt/oldTo reset the root password for the Linux operating system installed on the server, you must change the root directory by typing the following command:
:~# chroot /mnt/oldTo change the root password, type the following command: passwd
To leave the chroot environment, type the following command: exit
To unmount the drives, enter the following command: umount -a