Changing the Login Password on an ECS

Scenarios

This section describes how to change the password for logging in to an ECS when the password is about to expire, the password is forgotten, or you are logging in to the ECS for the first time. It is a good practice to change the initial password upon the first login.

Prerequisites

The ECS can be logged in.

Background

Table 1 shows the ECS password complexity requirements.

Table 1 Password complexity requirements

Parameter

Requirement

Password

  • Consists of 8 to 26 characters.

  • Contains at least three of the following character types:

    • Uppercase letters

    • Lowercase letters

    • Digits

    • Special characters:$!@%-_=+[]:./^,{}?

  • Cannot contain the username or the username spelled backwards.

  • Cannot contain more than two consecutive characters in the same sequence as they appear in the username. (This requirement applies only to Windows ECSs.)

  • Cannot start with a slash (/) for Windows ECSs.

Windows

  1. Log in to the ECS.

    For details, see Login Overview (Windows).

  2. Press Win+R to start the Run dialog box.

  3. Enter cmd to open the command-line interface (CLI) window.

  4. Run the following command to change the password (the new password must meet the requirements described in Table 1):

    net user Administrator New password

Linux

  1. Use the existing key file to log in to the ECS as user root through SSH.

    For details, see Logging In to a Linux ECS Using an SSH Key Pair.

  2. Run the following command to reset the password of user root:

    passwd

    To reset the password of another user, replace passwd with passwd username.

  3. Enter the new password as prompted. Ensure that the new password meets the requirements described in Table 1.

    New password:
    Retype new password:
    

    If the following information is displayed, the password has been changed:

    passwd: all authentication tokens updates successfully