Description

"read-only" user addition on SRX

Solution

The read-only user is a pre-defined class and you can add the user to the class.

We can use the command "show cli authorization" after logging in as the said user to know the permissions.

srx (ttyu0)

login: readuser

Password:

--- JUNOS 21.2R3-S4.8 built 2023-01-26 00:12:10 UTC

user@router> show cli authorization 

Current user: 'readuser  ' class 'read-only'

Permissions:

  view    -- Can view current values and statistics  <<<<<<<<< permission for read-only user class

Individual command authorization:

  Allow regular expression: none

  Deny regular expression: none

  Allow configuration regular expression: none

  Deny configuration regular expression: none

 

user@router>

 

  • To create a read-only user, follow the below steps (user "readuser" with UID "2000" and plain-text password is configured and mapped to class "read-only".)

 

user@router# set system login user readuser uid 2000

user@router# set system login user readuser authentication plain-text-password

New password:

Retype new password:

 

user@router# set system login user readuser class read-only

user@router# commit

 

 

Modification History

2024-01-24 : Article Created