No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ-how to limit the user just can use command of display current

Publication Date:  2012-07-27 Views:  66 Downloads:  0
Issue Description
Q: how to let user just only use "display current" command
Alarm Information
NULL
Handling Process
1) confirm which command belong to level 0


 Run command su 0 to switch level to level 0. And use ? to find which commands are belong to level 0:
<HUAWEI>su 0
Warning: Now user privilege is level 0, and only those commands whose level is equal to or less than this level can be used.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE
<HUAWEI>?
User view commands:
  display        Display current system information
  language-mode  Specify the language environment
  ping           Ping function
  quit           Exit from current command view
  return         Exit to user view
  save           Save file
  super          Privilege current user a specified priority level
  telnet         Establish a Telnet connection
  trace          Trace route(switch) to host on Data Link Layer
  tracert        Trace route to host
 
<HUAWEI>display ?
  atm                    ATM status and configuration information
  next-bootmode          next-bootmode


2、Raise the commands which you get on step 1 to level 1.
But quit and super can’t be raised to level 1, otherwise you can’t quit and switch level.
[HUAWEI]command-privilege level 1 view shell  language-mode
[HUAWEI]command-privilege level 1 view shell  ping
[HUAWEI]command-privilege level 1 view shell  return
[HUAWEI]command-privilege level 1 view shell  save
[HUAWEI]command-privilege level 1 view shell  telnet
[HUAWEI]command-privilege level 1 view shell  trace
[HUAWEI]command-privilege level 1 view shell  tracert

[HUAWEI]command-privilege level 1 view shell  display atm
[HUAWEI]command-privilege level 1 view shell  display next-bootmode


3、Set command of “display current-configuration”to level 0
[HUAWEI]command-privilege level 0 view system display
[HUAWEI]command-privilege level 0 view system display current-configuration


4、If you need using Pipe Character, so please reduce Pipe Character to level 0
[HUAWEI]command-privilege level 0 view system display current-configuration |
[HUAWEI]command-privilege level 0 view system display current-configuration | include
[HUAWEI]command-privilege level 0 view system display current-configuration | include 123
[HUAWEI]command-privilege level 0 view system display current-configuration | begin
[HUAWEI]command-privilege level 0 view system display current-configuration | begin 123
[HUAWEI]command-privilege level 0 view system display current-configuration | exclude
[HUAWEI]command-privilege level 0 view system display current-configuration | exclude 123


5、and then the effect of user with level 0 as following:
<HUAWEI>?
User view commands:
  display  Display current system information
  quit     Exit from current command view
  super    Privilege current user a specified priority level

<HUAWEI>display ?
  current-configuration  Current configuration

<HUAWEI>display current-configuration ?
  |     Matching output
  <cr>  

<HUAWEI>display current-configuration | include ?
  TEXT  First Match String

<HUAWEI>display current-configuration | ?      
  begin    Begin with the line that matches
  exclude  Match the character strings excluding with the regular expression
  include  Match the character strings including with the regular expression

<HUAWEI>display current-configuration | begin ?
  TEXT  First Match String
Root Cause
Need to raise all of command on level 0 (expect quit and super) to level 1, and also change command level of "display current" to Level 0.
Suggestions
NULL

END