Installing the One-Click Password Reset Plug-in on an ECS
You can reset the password for logging in to an ECS with just a few clicks if you forgot the password or the password expires.
After you have created an ECS, it is a good practice to log in to it and install the password reset plug-in.
One-click password reset is available only in Chinese regions.
The password reset plug-in has been installed on the ECSs created using a public image by default. To check whether the plug-in has been installed, see 1.
Notes
- The password reset plug-in is not installed by default. You can determine whether to install it.
- After the installation, do not uninstall the plug-in by yourself. Otherwise, the ECS password cannot be reset.
- After you reinstall or change the OS of an ECS, the one-click password reset function will become invalid. If you want to continue using this function, reinstall the password reset plug-in.
- After you replace the system disk of an ECS, the one-click password reset function will become invalid. If you want to continue using this function, reinstall the password reset plug-in.
- The password reset plug-in cannot be installed on a CoreOS ECS.
- To reset the password, the one-click password reset plug-in must be installed before the ECS password is lost or expires.
- The one-click password reset plug-in can be installed only after an EIP is bound to the ECS.
Prerequisites
- The available space in drive C of a Windows ECS is greater than 300 MB, and data can be written to it.
- The available space in the root directory of a Linux ECS is greater than 300 MB, and data can be written to it.
- One-click password reset can be used on the ECSs created using SUSE 11 SP4 only if their memory capacity is greater than or equal to 4 GiB.
- DHCP is enabled in the VPC which the ECS belongs to.
- The ECS network connectivity is normal.
- The NIC has been set to DHCP so that the ECS can dynamically obtain an IP address.
- The ECS security group rule in the outbound direction meets the following requirements:
- Protocol: TCP
- Port Range: 80
- Remote End: 169.254.0.0/16
If you use the default security group rules for the outbound direction, the preceding requirements are met, and the ECS can be initialized. The default security group rules for the outbound direction are as follows:
- Protocol: ANY
- Port Range: ANY
- Remote End: 0.0.0.0/16
Installing the Password Reset Plug-in on a Linux ECS
- Use either of the following methods to check whether the password reset plug-in has been installed on the ECS:
Method 1: Use the management console for query.
- Log in to the management console.
- Under Computing, click Elastic Cloud Server.
- Locate the row containing the target ECS, click More in the Operation column, and select Reset Password from the drop-down list.
- If a dialog box is displayed, asking you to enter the new password, the password reset plug-in has been installed. No further action is required.
- If a dialog box is displayed, asking you to download a password reset script, the password reset plug-in has not been installed. Then, install it.
Method 2: Use the ECS for query.- Log in to the ECS as user root.
- Run the following command to check whether CloudResetPwdAgent has been installed:
Check whether the obtained information is similar to that shown in Figure 1.
- If yes, the plug-in has been installed.
- If no, the plug-in has not been installed. Then, install it.
- Download the one-click password reset plug-in CloudResetPwdAgent.zip.
The plug-in is stored in the OBS bucket. Contact the administrator to obtain the path of the OBS bucket.
For example, the download path is http://xxx-cloud-reset-pwd.obs.com/linux/64/reset_pwd_agent/CloudResetPwdAgent.zip.
Then, run the following command:
wget http://xxx-cloud-reset-pwd.obs.com/linux/64/reset_pwd_agent/CloudResetPwdAgent.zip
- Run the following command to decompress CloudResetPwdAgent.zip:
There is no special requirement for the directory that stores the decompressed CloudResetPwdAgent.zip. Use any directory.
unzip -o -d Decompressed directory CloudResetPwdAgent.zip
An example is provided as follows:
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 {Plug-in decompressed directory}/CloudResetPwdAgent/CloudResetPwdAgent.Linux
For example:
If the plug-in is decompressed to /home/linux/test, run the following command:
cd /home/linux/test/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 password reset 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 the file permission of the password reset plug-in.
chmod 700 /CloudrResetPwdAgent/bin/cloudResetPwdAgent.script
chmod 700 /CloudrResetPwdAgent/bin/wrapper
chmod 600 /CloudrResetPwdAgent/lib/*
Installing the Password Reset Plug-in on a Windows ECS
- Log in to the ECS.
- Check whether the password reset plug-in CloudResetPwdAgent has been installed on the ECS. To check this, perform the following operations:
Start the Task Manager and check whether cloudResetPwdAgent is displayed on the Services tab. As shown in the Figure 2, the password reset plug-in has been installed on the ECS.
- If yes, no further action is required.
- If no, go to 3.
- Download package CloudResetPwdAgent.zip.
There is no special requirement for the directory that stores CloudResetPwdAgent.zip. Use any directory.
This package is stored in an OBS bucket. Contact the administrator to obtain the path of the OBS bucket.
- Decompress CloudResetPwdAgent.zip.
There is no special requirement for the directory that stores the decompressed CloudResetPwdAgent.zip. Use any directory.
- Install the plug-in.
- Double-click setup.bat in CloudResetPwdAgent.Windows.
The password reset plug-in starts to be installed.
- View the Task Manager and check whether the installation was successful.
If cloudResetPwdAgent is displayed in the Task Manager, as shown in Figure 3, the installation was 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.
Follow-up Procedure
- After the one-click password reset plug-in is installed, you can add it to the startup items to ensure that the plug-in automatically starts upon ECS startup. For details, see "What Do I Do If the One-Click Password Resetting Plug-In Failed to Start?" in Image Management Service User Guide.
- After installing the one-click password reset plug-in, do not delete the CloudResetPwdAgent process. Otherwise, one-click password reset will not be available.
- After the one-click password reset plug-ins are installed, you can view Dwrapper.key, which uniquely identifies the JVM process.
- The one-click password reset plug-in has been upgraded automatically. New ECSs work in PIPE mode by default, preventing their plug-ins from using service ports. Existing ECSs still work in AUTO mode, in which the plug-in randomly selects idle ports with the smallest port numbers ranging from 31000 to 32999. If the used port conflicts with a service port, see Why Am I Seeing the Message Indicating That the Port Is Used by a One-Click Password Reset Plug-in? for troubleshooting.
Uninstalling the Plug-in
If you do not need the password reset function anymore, perform the following operations to uninstall the plug-in:
- Linux ECS
- Log in to the ECS.
- 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 ECS
- Uninstall and delete CloudResetPwdAgent.
- Switch to the C:\CloudResetPwdAgent\bin folder.
- Double-click UninstallApp-NT.bat.
- Delete the file in C:\CloudResetPwdAgent.
- (Optional) Uninstall and delete CloudResetPwdUpdateAgent.
The plug-in varies depending on the Windows version. Check whether CloudResetPwdUpdateAgent exists. If it exists, perform the following operations to uninstall and delete it. If it does not exist, skip this step.
- Go to the C:\CloudResetPwdUpdateAgent folder.
- Double-click UninstallApp-NT.bat.
- Delete the file in C:\CloudResetPwdUpdateAgent.
If the deletion fails, delete CloudResetPwdUpdateAgent from Task Manager first and then delete the file in C:\CloudResetPwdUpdateAgent.
- Uninstall and delete CloudResetPwdAgent.
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