< Home

lock

Function

The lock command locks the current user interface to prevent unauthorized users from operating the interface.

By default, the system does not automatically lock the current user interface.

Format

lock

Parameters

None

Views

User view

Default Level

0: Visit level

Usage Guidelines

Usage Scenario

Lock the current user interface using this command to prevent other users from operating the interface. The user interface can be console or VTY.

After running the lock command, you are prompted to enter a password twice. If you enter the correct password twice, the user interface is locked.

Precautions

  • The passwords must meet the following requirements:
    • The password must be a string of 8 to 16 case-sensitive characters.

    • The password must contain at least two types of the following characters: upper-case characters, lower-case characters, digits, and special characters.

      Special characters do not include the question mark (?) and space.

  • The password entered in interactive mode is not displayed on the screen.

  • You can press CTRL_C to cancel the password-based locking operation.

  • To unlock the user interface, press Enter, and then enter the correct password as prompted.

Example

# Lock the current user interface after logging in through the console port.

<HUAWEI> lock
Please configure the login password (8-16)
Enter Password:
Confirm Password:
Info: The terminal is locked.

# To log in to the system again, press Enter. The following information is displayed:

Enter Password:

# Enter the correct password and return to the user view.

<HUAWEI>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >