< Home

command-privilege level

Function

The command-privilege level command sets a command level in a specified view.

The undo command-privilege command restores the default level.

By default, each command in each view has a default command level.

Format

command-privilege level level view view-name command-key

undo command-privilege [ level level ] view view-name command-key

Parameters

Parameter Description Value
level level Specifies a command level.

The value is an integer that ranges from 0 to 15.

view view-name

Specifies a view name. You can enter a question mark (?) in the terminal GUI to obtain all view names in the command view.

For example:
  • shell: user view
  • system: system view
  • vlan: VLAN view
-
command-key

Specifies a command. The command must be entered manually because automatic command line completion is not supported.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The system divides commands into levels for management. Each command in views has a specified level. The device administrator can change a command level as required so that a lower-level user can use certain high-level commands. The device administrator can also increase the command level to a larger value to improve device security.

Precautions

The rules for using this command to set the command level of a specified view are as follows:

  • When you degrade the target command, all keywords in the command are degraded.
  • When you upgrade the target command, only the last keyword in the command is upgraded.
  • When you set a level for the target command, the levels of all commands (in the same view) starting with this command are changed.
  • When you set a level for the target command, the keyword level in other commands having the same index as the keyword whose level is changed is also changed.
  • If the level of keywords that have the same index is modified for multiple times, the latest configured level takes effect.

Do not change the default command level. If you need to change it, consult with professional personnel to ensure that routine operation and maintenance are not affected and security risks are avoided.

Example

# Set the privilege level of the save command to 5.
<HUAWEI> system-view
[HUAWEI] command-privilege level 5 view shell save
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >