■ help
■ privilege
■ support
CLI Keyword Mapping
You cannot change the privilege level of keywords that are separated from the
command string by a parameter in the command sequence. In other words, once
the privilege algorithm reaches a parameter, the privilege algorithm that maps the
commands to the desired privilege level stops and allows any keyword options that
may follow in the command sequence. The algorithm then waits for a carriage return
before looking at the next command sequence.
For example, you can change the command privilege level for the telnet command.
However, because the telnet command is immediately followed by a variable (that
is, a hostname or IP address) and not a keyword, you cannot change the privilege
level for any keywords that follow the command.
host1#telnet ?
HOSTNAME or A.B.C.D The ip address of the remote system
host1#telnet router2 ?
<0 - 65535> The port on which to send the request
bgp Border Gateway Protocol (179)
chargen Character generator (19)
cmd Remote commands (rcmd, 514)
Setting Privileges for Ambiguous Commands
The privilege command allows you to set command privilege levels for parts of
commands that the CLI would normally consider ambiguous. In other words, you
can set privilege levels by specifying letters that represent only the beginning part
of a command or group of commands (even the first letter of a command or group
of commands).
The following example sets the privilege level to 12 for any Exec mode (user or
privileged) command that start with the letter “ t” :
host1(config)#privilege exec level 12 t
The list of affected commands includes telnet, terminal, test, and traceroute.
The following example changes all the above commands, with the exception of the
traceroute command, to level 15:
host1(config)#privilege exec level 15 te
The following example changes all commands that start with the letters “ te” (for
example, telnet, terminal, and test) and any second keyword that starts with the
letter “ i” and follows a command that starts with the letters “ te” (for example, the
keyword “ ip” in the command test ip) to level 1:
host1(config)#privilege exec level 1 te i
58 ■ CLI Command Privileges
JUNOSe 11.1.x System Basics Configuration Guide