Help Center> Bare Metal Server> Private Image Creation Guide> Linux> Installing the One-Click Password Reset Plug-in
Updated on 2023-09-04 GMT+08:00

Installing the One-Click Password Reset Plug-in

To enable you to reset the passwords for BMSs created from an image, install CloudResetPwdAgent when you create the image.

To uninstall the plug-in, perform the operations in Uninstalling the Plug-in.

This plug-in is not available for Kunpeng servers.

Prerequisites

The VM must have larger than 600 MB remaining space, and data can be written to its root directory.

Procedure

  1. Download CloudResetPwdAgent.zip and verify its integrity by referring to Obtaining the One-Click Password Reset Plug-in.

    There is no special requirement for the directory that stores CloudResetPwdAgent.zip.

  2. Decompress CloudResetPwdAgent.zip.

    There is no special requirement for the directory that stores the decompressed package.

    unzip -o -d Directory for decompressing the package CloudResetPwdAgent.zip

    Example:

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

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

  3. Install the one-click password reset plug-in.
    1. Open the CloudResetPwdAgent.Linux file.

      cd CloudResetPwdAgent/CloudResetPwdAgent.Linux

    2. Add the execute permission for the setup.sh file.

      chmod +x setup.sh

    3. Install the plug-in.

      sudo sh setup.sh

      If "cloudResetPwdAgent install successfully." is displayed and "Failed to start service cloudResetPwdAgent" is not displayed, the installation is successful.

      • If the installation failed, check whether the installation environment meets the requirements and install the plug-in again.
      • If the plug-in page is unavailable, run the corresponding command.
      1. Run curl http://169.254.169.254/openstack/latest/resetpwd_flag in the OS. If the return value is True, one-click password reset is supported. If the return value is False or None, one-click password reset is not supported.
      2. Run vim /var/log/message. If CentOS is used, the logs are message logs. If Ubuntu is used, the logs are syslog logs. Search for bound to near the startup time to view the time when the IP address was obtained.
      3. Run vim /var/log/message to search for the first ResetPwd near the startup time to view the time when cloudResetPwdAgent started.
      4. Run systemd-analyze plot > start.svg to export start.svg, and open it using Internet Explorer.
      5. Perform the following operations or contact the ECS R&D personnel who are responsible for one-click password reset.

        Run systemctl cat cloudResetPwdAgent to obtain the configuration file and its location.

        Modify the configuration file based on the Cloud-Init configuration, especially the After line.

        [Unit]

        ...

        After=network-online.target

      6. Restart the BMS.

Uninstalling the Plug-in

  1. Log in to the BMS.
  2. Run the following commands to switch to the bin directory and delete cloudResetPwdAgent:

    cd /CloudrResetPwdAgent/bin

    sudo ./cloudResetPwdAgent.script remove

  3. 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