< Home

lock (User view)

Function

The lock command locks the current user interface to prevent unauthorized users from performing operations on the terminal interface.

Format

lock

Parameters

None

Views

User view

Default Level

0: Visit level

Usage Guidelines

The user interfaces include the interfaces of the console port and Virtual Type Terminal (VTY).

When you run the lock command, the system prompts you to enter a temporary password for the screen saver twice. If the two passwords are the same, the current interface is locked successfully. After that, if you want to enter the system, press Enter first and type the password after being prompted. When you enter the new password, you can unlock the user interface and enter the system.

The password is a string of 8 to 16 characters and must meet the minimum complexity requirement. That is, the password must contain at least two of the following, including upper-case letters (A to Z), lower-case letters (a to z), digits (0 to 9), and special characters (such as !, $, #, and %).

Example

# A user logs in from the console port and locks the current user interface.

<sysname> lock
Enter Password:
Confirm Password:
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >