Este conteúdo foi traduzido por máquina para sua conveniência e a Huawei Cloud não pode garantir que o conteúdo foi traduzido com precisão. Para exibir o conteúdo original, use o link no canto superior direito para mudar para a página em inglês.
Atualizado em 2025-01-23 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.

Resetting the ECS login password on the management console is recommended.

Prerequisites

The ECS can be logged in.

Background

Tabela 1 shows the ECS password complexity requirements.

Tabela 1 Requisitos de complexidade de senha

Parâmetro

Requisito

Exemplo Valor

Senha

  • Consiste de 8 a 26 caracteres.
  • Contém pelo menos três dos seguintes tipos de caracteres:
    • Letras maiúsculas
    • Letras minúsculas
    • Dígitos
    • Caracteres especiais para Windows: $!@%-_=+[]:./,?
    • Caracteres especiais para Linux: !@%-_=+[]:./^,{}?
  • Não pode conter o nome de usuário ou o nome de usuário soletrado para trás.
  • Não pode conter mais de dois caracteres consecutivos na mesma sequência que aparecem no nome de usuário. (Este requisito aplica-se apenas aos ECS de Windows.)

YNbUwp!dUc9MClnv

NOTA:

A senha de exemplo é gerada aleatoriamente. Não o use.

Windows

  1. Log in to the ECS.

    For details, see Login Overview.

  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 Tabela 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 Login Using an SSH Key.

  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 Tabela 1.
    New password:
    Retype new password:
    If the following information is displayed, the password has been changed:
    passwd: password updated successfully