Wired Intelligent Edge (Campus Switching and Routing)

How To Setup Additional Commands For User-Level 1

MVP Expert
MVP Expert
Requirement:

By default on Comware v5 switches, limited command is available to use at User-level 0, 1 & 2.
Command level falls into four levels: visit (0), monitor(1), system (2) and manage (3). The administrator can assign a privilege level for a user according to the user’s need.

The command-privilege command is used to assign a level for the specified command in a specified view.



Solution:

We will add following commands to User-level 1 on the switch:

  • display current-configuration

  • display saved-configuration

  • dir

  • display boot-loader



Configuration:

User with level 1 privilege logs in to the switch:

<SW1>display current-configuration
                          ^
% Unrecognized command found at '^' position.

<SW1>display saved-configuration
                          ^
% Unrecognized command found at '^' position.

<SW1>dir
            ^
% Unrecognized command found at '^' position.

<SW1>display boot-loader
                          ^
% Unrecognized command found at '^' position.

 

Login to switch with user-privilege 3 and perform the below operations:

Enter system view and configure the desired commands:

 <SW1>system-view
 System View: return to User View with Ctrl+Z.
 [SW1] command-privilege level 1 view system display current-configuration
 [SW1] command-privilege level 1 view system display saved-configuration
 [SW1] command-privilege level 1 view shell dir
 [SW1] command-privilege level 1 view system display boot-loader
 [SW1]quit



Verification

Login to switch with user-privilege 1 and test the commands:

<SW1>dir
 Directory of flash:/
 
    0     -rw-   8876183  Oct 31 2019 04:51:52   logfile.log
    1    -rw-  21372116  Oct 31 2019 18:22:37   s5800_5820x-cmw520-r1110p06.bin

 

 <SW1>display current-configuration
 #
  version 5.20, Release 1211P06
 #
  sysname SW1
 #
  command-privilege level 1 view system display current-configuration
  command-privilege level 1 view system display saved-configuration
  command-privilege level 1 view shell dir
  command-privilege level 1 view user-interface display boot-loader

#
return

 

<SW1>display boot-loader
Slot 1
 The current boot app is:  flash:/a5800_5820x-cmw520-r1211p06.bin
 The main boot app is:     flash:/a5800_5820x-cmw520-r1211p06.bin
 

Version history
Revision #:
1 of 1
Last update:
a week ago
Updated by:
 
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: