Help Center> Huawei Cloud Flexus> FAQs> FlexusL> Password> What Should I Do If the Password Cannot Be Reset After I Use a Private Linux Image to Create a FlexusL Instance or Change the OS of an Existing Instance and I Know the Initial Password of the Private Image?
Updated on 2024-06-17 GMT+08:00

What Should I Do If the Password Cannot Be Reset After I Use a Private Linux Image to Create a FlexusL Instance or Change the OS of an Existing Instance and I Know the Initial Password of the Private Image?

Symptom

After I use a private Linux image to create a FlexusL instance or change the OS of an existing instance, I cannot log in to the server in the instance by resetting the password. If the private image is created from a server on another cloud platform or downloaded from a third party, the image may not have the password reset plug-in installed, so the password reset function is unavailable.

Procedure

  1. Log in to the server in the FlexusL instance as user root.
  2. Run the following command to check whether CloudResetPwdAgent has been installed:

    ls -lh /Cloud*

    Figure 1 Checking whether the plug-in has been installed

    Check whether the command output is similar to that shown in Figure 1.

    • If yes, the plug-in has been installed. No further actions are required.
    • If no, the plug-in has not been installed. Go to the next step.
  3. Obtain the one-click password reset plug-in CloudResetPwdAgent.zip and verify its integrity (Linux).

    There is no special requirement for the directory where the plug-in should be stored.

  4. Decompress CloudResetPwdAgent.zip.

    There is no special requirement for the directory where the CloudResetPwdAgent.zip should be decompressed.

    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

  5. Install the password reset plugin.
    1. Open the CloudResetPwdAgent.Linux file.

      cd {Plug-in decompressed directory}/CloudResetPwdAgent/CloudResetPwdAgent.Linux

      Example:

      If the plug-in is decompressed to /home/linux/test, run the following command:

      cd /home/linux/test/CloudResetPwdAgent/CloudResetPwdAgent.Linux

    2. Grant the execute permission to 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 requirements and try to install the plug-in again.

  6. Modify file permissions for the password reset plug-in.

    chmod 700 /CloudrResetPwdAgent/bin/cloudResetPwdAgent.script

    chmod 700 /CloudrResetPwdAgent/bin/wrapper

    chmod 600 /CloudrResetPwdAgent/lib/*

    After the preceding operations are complete, restart the FlexusL instance on the console and then you can reset the password.

Password FAQs

more