Description

A user with "view" permissions has predefined authorization to perform certain tasks. For more information, refer to Understanding Junos OS Access Privilege Levels .

This article explains how to configure the “view” permissions to restrict a user’s access to a specific set of operational commands.

Solution

Example 1

Admin1 is in class VIEW-general . This user can perform commands including show , some set , and some request
 
set system login class VIEW-general permissions view
set system login class VIEW-general permissions view-configuration
set system login user admin1 uid 2000
set system login user admin1 class VIEW-general
set system login user admin1 authentication encrypted-password "$ABC123"

Result
 
admin1@srx210H> set ?
Possible completions:
cli Set CLI properties

admin1@srx210H> request ?
Possible completions:
chassis Perform chassis-specific operations
dhcp Perform DHCP operations
dhcpv6 Perform DHCPv6 operations
interface Perform interface tasks
lacp Request LACP actions
message Send text message to other users
modem
multicast Perform multicast operations
network-access Request network-access related information
pppoe Perform PPPoE specific operations
security Request security operation
services Service requests
snmp Request actions from the Simple Network Management Protocol daemon
wlan Wireless LAN related requests


 
Example 2

Admin2 is in class VIEW-limit , having the permissions view and restricted to only some commands, such as show , set cli timestamp , and exit .
set system login class VIEW-limit permissions view
set system login class VIEW-limit permissions view-configuration
set system login class VIEW-limit allow-commands "^show .*|(set cli timestamp)|exit" 
set system login class VIEW-limit deny-commands .*

set system login user admin2 uid 2005
set system login user admin2 class VIEW-limit
set system login user admin2 authentication encrypted-password "$ABC123"

Result

admin2@srx210H> request
                ^
unknown command.

admin2@srx210H> set ?
Possible completions:
cli Set CLI properties

Note: For a general explanation, refer to Specifying Access Privileges for Junos OS Operational Mode Commands .