Got it

How to Reset the Root Password of an Euler ECS?

Created: Feb 22, 2022 02:54:38Latest reply: Mar 25, 2022 11:50:04 320 2 1 0 0
  HiCoins as reward: 0 (problem unresolved)

Hello everyone!


This post enquires how to reset the root password of an Euler ECS. Please see more below.


ISSUE DESCRIPTION


I have one Huawei Cloud Stack Euler ECS, but I have forgotten the root password. How do I reset the root password of an Euler ECS?


Thanks in advance for assisting me!

  • x
  • convention:

Featured Answers
olive.zhao
Admin Created Feb 22, 2022 03:04:35

Hello, friend!

Step 1 Download the script used to reset the password and upload the script to the
temporary ECS. 

1. Log in to ManageOne, and choose Computing > Elastic Cloud Server

2. Locate the row that contains the ECS (the original Linux ECS) whose password
needs to be reset, click More > Reset Password in the Operation column.
Download the password resetting script as instructed. 

3. Use a remote connection tool, such as WinSCP, to upload thechangepasswd.sh script obtained.

Step 2 Stop the original Linux ECS, detach the system disk, and attach the system disk to
the temporary ECS. 

1. Stop the original Linux ECS, switch to the details page, and click the EVS tab. 

2. Locate the row containing the system disk to be detached and click Detach to
detach the system disk from the ECS. 

3. On the page showing the details of the temporary ECS, click the EVS tab. 

4. Click Attach Disk. In the displayed dialog box, select the system disk detached
in Step 2.2 and attach it to the temporary ECS. 

Step 3 Remotely log in to the temporary ECS, upload the script to it, and reset the
password. 

1. Locate the row containing the temporary ECS and click Remote Login in theOperation column. 

2. Run the following command to view the directory of the system disk detached
from the original Linux ECS now attached to the temporary ECS: 

fdisk -l 

3. Run the following commands in the directory where the script is stored to run
the script for resetting the password:

chmod +x changepasswd.sh 

./changepasswd.sh 

When you run the password reset script, if the system displays a message
indicating that there is no command related to logical volume manager
(LVM), such as the message "no lvs command", install an LVM tool on the
temporary ECS. The LVM2 tool is recommended. 

4. Enter the new password and the directory obtained in Step 3.2 as prompted. 

The password is changed if the following information is displayed: 

set password success. 

Step 4 Stop the temporary ECS, detach the system disk of the original Linux ECS, attach
the system disk to the original Linux ECS, and restart the ECS. 

1. Stop the temporary ECS, switch to the details page, and click the EVS tab. 

2. Click Detach to detach the data disk temporarily attached in Step 2.4. 

3. On the page showing the details of the original Linux ECS, click the EVS tab. 

4. Click Attach Disk. In the displayed dialog box, select the data disk detached
in Step 4.2 and mount point /dev/sda

5. Restart the original Linux ECS.

Hope this helps!

View more
  • x
  • convention:

All Answers
olive.zhao
olive.zhao Admin Created Feb 22, 2022 03:04:35

Hello, friend!

Step 1 Download the script used to reset the password and upload the script to the
temporary ECS. 

1. Log in to ManageOne, and choose Computing > Elastic Cloud Server

2. Locate the row that contains the ECS (the original Linux ECS) whose password
needs to be reset, click More > Reset Password in the Operation column.
Download the password resetting script as instructed. 

3. Use a remote connection tool, such as WinSCP, to upload thechangepasswd.sh script obtained.

Step 2 Stop the original Linux ECS, detach the system disk, and attach the system disk to
the temporary ECS. 

1. Stop the original Linux ECS, switch to the details page, and click the EVS tab. 

2. Locate the row containing the system disk to be detached and click Detach to
detach the system disk from the ECS. 

3. On the page showing the details of the temporary ECS, click the EVS tab. 

4. Click Attach Disk. In the displayed dialog box, select the system disk detached
in Step 2.2 and attach it to the temporary ECS. 

Step 3 Remotely log in to the temporary ECS, upload the script to it, and reset the
password. 

1. Locate the row containing the temporary ECS and click Remote Login in theOperation column. 

2. Run the following command to view the directory of the system disk detached
from the original Linux ECS now attached to the temporary ECS: 

fdisk -l 

3. Run the following commands in the directory where the script is stored to run
the script for resetting the password:

chmod +x changepasswd.sh 

./changepasswd.sh 

When you run the password reset script, if the system displays a message
indicating that there is no command related to logical volume manager
(LVM), such as the message "no lvs command", install an LVM tool on the
temporary ECS. The LVM2 tool is recommended. 

4. Enter the new password and the directory obtained in Step 3.2 as prompted. 

The password is changed if the following information is displayed: 

set password success. 

Step 4 Stop the temporary ECS, detach the system disk of the original Linux ECS, attach
the system disk to the original Linux ECS, and restart the ECS. 

1. Stop the temporary ECS, switch to the details page, and click the EVS tab. 

2. Click Detach to detach the data disk temporarily attached in Step 2.4. 

3. On the page showing the details of the original Linux ECS, click the EVS tab. 

4. Click Attach Disk. In the displayed dialog box, select the data disk detached
in Step 4.2 and mount point /dev/sda

5. Restart the original Linux ECS.

Hope this helps!

View more
  • x
  • convention:

Joel.Ramos
Joel.Ramos Created Mar 25, 2022 11:50:04

  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.