Help Center> Image Management Service> User Guide> Linux Operations> Installing the One-Click Password Reset Plug-In

Installing the One-Click Password Reset Plug-In

Scenarios

You are advised to install the password reset plug-in CloudResetPwdAgent before creating a private image. In this way, you can reset the password of ECSs created from the image by a few clicks. For details, see Resetting the ECS Password on the Management Console.

  • ECSs created from a public image have this plug-in installed by default.
  • For ECSs created from an external image file, install the plug-in by performing the operations in this section.

Precautions

  • You can decide whether to install the CloudResetPwdAgent plug-in.
  • The plug-in has been open-sourced in the GitHub open-source platform according to GNU General Public License v2.0.
  • Not all OSs support the one-click password reset plug-in. Table 1 lists the OSs that support this plug-in.
    Table 1 OSs that support the one-click password reset plug-in

    OS Type

    OS Version

    CentOS

    CentOS 7.3 64bit

    CentOS 7.2 64bit

    CentOS 7.0 64bit

    CentOS 7.1 64bit

    CentOS 6.9 64bit

    CentOS 6.8 64bit

    CentOS 6.8 32bit

    CentOS 6.6 32bit

    CentOS 6.6 64bit

    CentOS 6.5 64bit

    CentOS 6.4 64bit

    CentOS 6.3 64bit

    Debian

    Debian 9.0 64bit

    Debian 8.8 64bit

    Debian 8.2 64bit

    Debian 7.5 64bit

    Debian 7.5 32bit

    openSUSE

    openSUSE 42.2 64bit

    openSUSE 13.2 64bit

    openSUSE Leap 42.2 64bit

    openSUSE Leap 42.1 64bit

    SUSE

    SUSE 12 SP2 64bit

    SUSE 12 SP1 64bit

    SUSE 11 SP4 64bit

    Ubuntu

    Ubuntu 16.10 32bit

    Ubuntu 16.04 32bit

    Ubuntu Server 16.04 64bit

    Ubuntu Server 14.04 64bit

    Ubuntu Server 14.04 32bit

    EulerOS

    EulerOS 2.2 64bit

    Fedora

    Fedora 25 64bit

    Fedora 24 64bit

    Oracle Linux

    Oracle Linux 7.3 64bit

    Oracle Linux 6.9 64bit

    Oracle Linux 6.5 64bit

Prerequisites

  • The ECS status is Running.
  • The ECS must have a remaining space of more than 300 MB, and data can be written to its root directory.
  • ECSs created using a SUSE 11 SP4 image must have 4 GB or a larger memory.
  • DHCP must be enabled for the VPC used by the ECS.
  • Networks of the ECS are normal.
  • The outbound security group rule of the ECS 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, preceding requirements can be met, and the ECS can be initialized. The default outbound security group rule is as follows:

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

Procedure

  1. Check whether the plug-in (consisting of CloudResetPwdAgent and CloudResetPwdUpdateAgent) has been installed on the ECS.

    You can use either of the following methods:

    Method 1: Check whether the plug-in has been installed on the management console.

    1. Log in to the management console.
    2. Under Computing, click Elastic Cloud Server.
    3. Locate the row that contains the target ECS, click More in the Operation column, and select Reset Password from the drop-down list box.
      • If the system prompts you to reset the password for the ECS, the one-click password reset plug-in has been installed. No further action is required.
      • If the system prompts you to download and install the password reset software, the password reset plug-in has not been installed. Go to 2 to install it.
    Method 2: Log in to the ECS and check whether the plug-in has been installed.
    1. Log in to the ECS as user root.
    2. Run the following command to check whether CloudResetPwdAgent and CloudResetPwdUpdateAgent are installed:

      ls -lh /Cloud*

      Figure 1 Checking whether the plug-in has been installed

      Check whether the 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. Go to 2 to install it.
  2. Download and decompress CloudResetPwdAgent.zip.

    The one-click password reset plug-in can be automatically updated only if an EIP is bound to the ECS.

    The download path is as follows:

    For 32-bit OSs (x86): http://cn-south-1-cloud-reset-pwd.obs.cn-south-1.myhuaweicloud.com/linux/32/reset_pwd_agent/CloudResetPwdAgent.zip

    For 64-bit OSs (x86): http://cn-south-1-cloud-reset-pwd.obs.cn-south-1.myhuaweicloud.com/linux/64/reset_pwd_agent/CloudResetPwdAgent.zip

    For 64-bit OSs (ARM): https://cn-south-1-cloud-reset-pwd.obs.cn-south-1.myhuaweicloud.com/arm/linux/64/reset_pwd_agent/CloudResetPwdAgent.zip

  3. Install the one-click password reset plug-in.
    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 plug-in:

      sudo sh setup.sh

    4. Run the following command 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 failed.

      • You can also check whether the password reset plug-in is successfully installed by referring to 1.
      • If the installation failed, check whether the installation environment meets the requirements and install the plug-in again.