Help Center > Elastic Cloud Server > User Guide > Getting Started > (Optional) Installing One-Click Password Reset Plugins

(Optional) Installing One-Click Password Reset Plugins

The public cloud platform provides the password reset function. If the password of your ECS is lost or expires and your ECS has password reset plugins installed, you can reset the password with a few clicks.

This method is convenient and efficient. After you have created an ECS, you are advised to log in to it and install the password reset plugins.

Notes

  1. You can determine whether to install password reset plugins.
  2. You will be responsible for the failure to reset the ECS password if you uninstall Cloud-reset-pwd Agent after having installed it.
  3. 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 password reset plugins.
  4. 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 password reset plugins.
  5. Password reset plugins cannot be installed on a CoreOS ECS.
  6. If you install password reset plugins after your ECS password has expired or been lost, the one-click password reset function will not take effect.
  7. One-click password reset plugins can automatically update after an EIP is bound to the ECS.
  8. The one-click password reset plugin CloudResetPwdAgent has been open-sourced in the Github open-source platform according to GNU General Public License v2.0.

Prerequisites

  • A Windows ECS must have larger than 300 MB remaining space and data can be written to its drive C.

    A Linux ECS must have larger than 300 MB remaining space and data can be written to its root directory.

  • DHCP must be enabled in the VPC to which the ECS belongs.
  • The ECS network connectivity is normal.
  • ECS security group rules in the outbound direction must 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, and the ECS can be initialized. Default security group rules in the outbound direction are as follows:

    • Protocol: ANY
    • Port Range: ANY
    • Remote End: 0.0.0.0/16

Installing Password Reset Plugins on a Linux ECS

  1. Check whether the password reset plugins have been installed on the ECS.

    1. Log in to the ECS.
    2. Check whether CloudResetPwdAgent has been installed. To do so, perform the following operations:
      1. Check whether the CloudResetPwdAgent directory exists in the root directory of the ECS.
      2. Run the following command to check whether the status of CloudResetPwdAgent is unrecognized service:

        service cloudResetPwdAgent status

      If the CloudResetPwdAgent directory exists in the root directory of the ECS and the status of CloudResetPwdAgent is not unrecognized service, CloudResetPwdAgent has been installed on the ECS.

      • If yes, go to 1.c.
      • If no, go to 2.
    3. Check whether CloudResetPwdUpdateAgent has been installed. To do so, perform the following operations:
      1. Check whether the CloudResetPwdUpdateAgent directory exists in the root directory of the ECS.
      2. Run the following command to check whether the status of CloudResetPwdUpdateAgent is unrecognized service:

        service cloudResetPwdUpdateAgent status

      If the CloudResetPwdUpdateAgent directory exists in the root directory of the ECS and the status of CloudResetPwdUpdateAgent is not  unrecognized service, CloudResetPwdUpdateAgent has been installed on the ECS.
      • If the password can be obtained, no further action is required.
      • If no, go to 2.

  2. Download the one-click password reset plugin CloudResetPwdAgent.zip according to your OS, 32bit or 64bit.

    There is no special requirement on the directory for storing CloudResetPwdAgent.zip. Customize the directory.

  3. Run the following command to decompress CloudResetPwdAgent.zip:

    There is no special requirement on the directory for storing decompressed CloudResetPwdAgent.zip. Customize the directory.

    unzip -o -d Decompressed directory CloudResetPwdAgent.zip

    An example is provided as follows:

    If the decompressed directory is /home/linux/test, run the following command:

    unzip -o -d /home/linux/test CloudResetPwdAgent.zip

  4. Install the one-click password reset plugins.

    1. Run the following command to open the CloudResetPwdUpdateAgent.Linux file:

      cd CloudResetPwdAgent/CloudResetPwdUpdateAgent.Linux

    2. Run the following command to add the execute permission for the setup.sh file:

      chmod +x setup.sh

    3. Run the following command to install the plugins:

      sudo sh setup.sh

    4. Run the following commands to check whether the installation is successful:

      service cloudResetPwdAgent status

      service cloudResetPwdUpdateAgent status

      If the status of CloudResetPwdAgent and CoudResetPwdUpdateAgent is not unrecognized service, the installation is successful. Otherwise, the installation fails.

      NOTE:

      If the installation fails, check whether the installation environment meets requirements and install the plugins again.

Installing Password Reset Plugins on a Windows ECS

  1. Log in to the ECS.
  2. Check whether password reset plugins CloudResetPwdAgent and CloudResetPwdUpdateAgent have been installed on the ECS. To check this, perform the following operations:

    Start the Task Manager and check whether cloudResetPwdAgent and cloudResetPwdUpdateAgent are displayed on the Services tab.

    Figure 1 Windows Task Manager
    • If yes, no further action is required.
    • If no, go to 3.

  3. Download the one-click password reset plugin CloudResetPwdAgent.zip.

    There is no special requirement on the directory for storing CloudResetPwdAgent.zip. Customize the directory.

    Download path: http://cn-south-1-cloud-reset-pwd.obs.myhwclouds.com/windows/reset_pwd_agent/CloudResetPwdAgent.zip

  4. Decompress CloudResetPwdAgent.zip.

    There is no special requirement on the directory for storing decompressed CloudResetPwdAgent.zip. Customize the directory.

  5. Install the plugins.

    1. Double-click setup.bat in the /CloudResetPwdAgent/CloudResetPwdUpdateAgent.Windows directory.
    2. View the Task Manager and check whether the installation is successful.

      If cloudResetPwdAgent and cloudResetPwdUpdateAgent are displayed in the Task Manager, the installation is successful. Otherwise, the installation fails.

      NOTE:

      If the installation fails, check whether the installation environment meets requirements and install the plugins again.

Updating the Plugins

You do not need to pay special attention to the plugin updating because the system will automatically update them.

Uninstalling the Plugins

If you do not need the password reset function any more, perform the following operations to uninstall them:

  • For Linux ECSs:
    1. Log in to the ECS.
    2. Run the following commands to open the bin file and delete cloudResetPwdAgent:

      cd /CloudrResetPwdAgent/bin

      sudo ./cloudResetPwdAgent.script remove

    3. Run the following commands to open the bin file and delete cloudResetPwdUpdateAgent:

      cd /CloudResetPwdUpdateAgent/bin

      sudo ./cloudResetPwdUpdateAgent.script remove

    4. Run the following command to delete the plugins:

      sudo rm -rf /CloudrResetPwdAgent

      sudo rm -rf /CloudResetPwdUpdateAgent

  • For Windows ECSs:
    1. Switch to the C:\CloudResetPwdUpdateAgent\bin directory.
    2. Double-click UninstallApp-NT.bat.
    3. Delete the file in C:\CloudResetPwdUpdateAgent.
    4. Switch to the C:\CloudResetPwdAgent\bin directory.
    5. Double-click UninstallApp-NT.bat.
    6. Delete the file in C:\CloudResetPwdAgent.
Registration