Estos contenidos se han traducido de forma automática para su comodidad, pero Huawei Cloud no garantiza la exactitud de estos. Para consultar los contenidos originales, acceda a la versión en inglés.
Actualización más reciente 2023-08-08 GMT+08:00

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

Tabla 1 shows the ECS password complexity requirements.

Tabla 1 Requerimientos de complejidad de la contraseña

Parámetro

Requisito

Valor de ejemplo

Contraseña

  • Consta de 8 a 26 caracteres.
  • Contiene al menos tres de los siguientes tipos de caracteres:
    • Letras en mayúscula
    • Letras en minúscula
    • Dígitos
    • Caracteres especiales para Windows: $!@%-_=+[]:./,?
    • Caracteres especiales para Linux: !@%-_=+[]:./^,{}?
  • No puede contener el nombre de usuario ni el nombre de usuario escrito al revés.
  • No puede contener más de dos caracteres consecutivos en la misma secuencia que aparecen en el nombre de usuario. (Este requisito solo se aplica a los ECS de Windows.)

YNbUwp!dUc9MClnv

NOTA:

La contraseña de ejemplo se genera aleatoriamente. No lo use.

Windows

  1. Log in to the ECS.
  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 Tabla 1):

    net user Administrator New password

Linux

  1. Use the existing key file to log in to the ECS as user root through SSH.
  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 Tabla 1.
    New password:
    Retype new password:
    If the following information is displayed, the password has been changed:
    passwd: password updated successfully