Installing the One-Click Password Reset Plug-in
Scenarios
If the password of your BMS is lost or expires and your BMS has the password reset plug-in CloudResetPwdAgent installed, you can reset the password by a few clicks.
This method is convenient and efficient. After you have created a BMS, you are advised to log in to it and install the one-click password reset plug-in.
By default, the one-click password reset plug-in has been installed on the BMSs created using public images. To check whether the plug-in has been installed for the BMS, see step 1 in "Install the Password Reset Plug-ins on a Linux BMS" or step 1 in "Install the Password Reset Plug-ins on a Windows BMS".
Notes
- Do not use any other password reset plug-in.
- It is up to you to decide whether to install the CloudResetPwdAgent plug-in.
- After installing the plug-in, do not uninstall it. Otherwise, you may fail to reset the password on the management console.
- After you reinstall or change the BMS OS, the one-click password resetting function will become invalid. If you still want to use this function, reinstall the CloudResetPwdAgent plug-in.
- CloudResetPwdAgent can be automatically upgraded only if an EIP is bound to the BMS. You can also download the upgrade package and upgrade CloudResetPwdAgent manually.
Prerequisites
- The BMS must be in Running state.
- A Windows BMS must have larger than 600 MB remaining space and data can be written to its drive C.
A Linux BMS must have larger than 600 MB remaining space and data can be written to its root directory.
- Ensure that DHCP is enabled in the VPC to which the BMS belongs.
- The BMS network connectivity is normal.
- Ensure that security group rules in the outbound direction meet the following requirements:
- Protocol: TCP
- Port Range: 80
- Remote End: 169.254.0.0/16
If you use the default outbound security group rule, the preceding requirements are met. The default outbound security group rule is as follows:
- Protocol: ANY
- Port Range: ANY
- Remote End: 0.0.0.0/16
Install the Password Reset Plug-in on a Linux BMS
- Use either of the following methods to check whether the password reset plug-in is installed on the BMS:
Method 1: Use the management console.
- Log in to the management console.
- Under Computing, click Bare Metal Server.
The BMS console is displayed.
- Locate the row that contains the BMS, click More in the Operation column, and select Reset Password from the drop-down list.
Method 2: Log in to the OS.
- Log in to the BMS as user root.
- Run the following command to check whether CloudResetPwdAgent has been installed:
Check whether information similar to Figure 3 is displayed.
- If yes, the plugin has been installed.
- If no, the plug-in has not been installed. Then, install it.
- Download the plug-in package CloudResetPwdAgent.zip and verify its integrity by referring to Obtain the One-Click Password Reset Plug-In and Verifying Its Integrity (Linux).
There is no special requirement for the directory that stores CloudResetPwdAgent.zip.
- Run the following command to decompress CloudResetPwdAgent.zip:
There is no special requirement for the directory that stores the decompressed CloudResetPwdAgent.zip.
unzip -o -d Decompressed directory CloudResetPwdAgent.zip
Example:
If the plug-in is decompressed to /home/linux/test, run the following command:
unzip -o -d /home/linux/test CloudResetPwdAgent.zip
- Install the one-click password reset plug-in.
- Run the following command to open the CloudResetPwdAgent.Linux file:
cd CloudResetPwdAgent/CloudResetPwdAgent.Linux
- Run the following command to add the execute permission for the setup.sh file:
chmod +x setup.sh
- Run the following command to install the plug-in:
If "cloudResetPwdAgent install successfully." is displayed and "Failed to start service cloudResetPwdAgent" is not displayed, the installation is successful.
- You can also check whether the plug-in has been installed using the methods provided in 1.
- If the installation failed, check whether the installation environment meets requirements and install the plug-in again.
- Run the following command to open the CloudResetPwdAgent.Linux file:
- Modify file permissions for the password reset plug-in.
chmod 700 /CloudrResetPwdAgent/bin/cloudResetPwdAgent.script
chmod 700 /CloudrResetPwdAgent/bin/wrapper
chmod 600 /CloudrResetPwdAgent/lib/*
Install the Password Reset Plug-in on a Windows BMS
- Check whether CloudResetPwdAgent has been installed on the BMS. To check this, perform the following operations:
Start the Task Manager and check whether cloudResetPwdAgent is displayed on the Services tab page.
Figure 4 Successful plug-in installation
- If yes, no further action is required.
- If no, go to the next step.
- Download the plug-in package CloudResetPwdAgent.zip and verify its integrity by referring to Obtain the One-Click Password Reset Plug-In and Verifying Its Integrity (Windows).
There is no special requirement for the directory that stores CloudResetPwdAgent.zip.
Download path: https://cn-south-1-cloud-reset-pwd.obs.cn-south-1.myhuaweicloud.com/windows/reset_pwd_agent/CloudResetPwdAgent.zip
- Decompress CloudResetPwdAgent.zip.
There is no special requirement for the directory that stores the decompressed CloudResetPwdAgent.zip.
- Install the plug-in.
- Double-click setup.bat in CloudResetPwdAgent.Windows.
The password reset plug-in starts to be installed.
- View the Task Manager to check whether the installation is successful.
If cloudResetPwdAgent is displayed in the Task Manager, as shown in Figure 5, the installation is successful. Otherwise, the installation failed.
If the installation failed, check whether the installation environment meets requirements and install the plug-in again.
- Double-click setup.bat in CloudResetPwdAgent.Windows.
Uninstall the Password Reset Plug-in
If you do not need the password reset function any longer, perform the following operations to uninstall the plug-in:
- Linux
- Log in to the BMS.
- Run the following commands to switch to the bin directory and delete cloudResetPwdAgent:
cd /CloudrResetPwdAgent/bin
sudo ./cloudResetPwdAgent.script remove
- Run the following command to delete the plug-in:
sudo rm -rf /CloudrResetPwdAgent
Check whether CloudResetPwdUpdateAgent exists. If it exists, run the following command to delete it:
sudo rm -rf /CloudResetPwdUpdateAgent
- Windows
- Switch to the C:\CloudResetPwdAgent\bin folder.
- Double-click UninstallApp-NT.bat.
- Delete the file in C:\CloudResetPwdAgent.
- Delete the file in C:\CloudResetPwdUpdateAgent.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot