class (Defining Login Classes)
Syntax
class class-name { allow-hidden-commands; no-hidden-commands { except [“regular expression or command 1” “regular expression or command 2” ...]; } access-end hh:mm; access-start hh:mm; allow-commands (regular-expression1)|(regular-expression2)...; allow-commands-regexps [“regular expression 1” “regular expression 2 ” ... ]; allow-configuration (regular-expression1)|(regular-expression2)...; allow-configuration-exact-match configuration; allow-configuration-regexps (regular-expression1)|(regular-expression2)...; allowed-days(monday | tuesday | wednesday | thursday | friday | saturday | sunday); allow-sources [ source-addresses ... ]; allow-times [ times ... ]; cli { prompt prompt; timestamp { format format; } } configuration-breadcrumbs; confirm-commands (regular expression or command 1)|(regular expression or command 2) { confirmation-message; } deny-commands (regular-expression1)|(regular-expression2)...; deny-commands-regexps (regular-expression1)|(regular-expression2)...; deny-configuration (regular-expression1)|(regular-expression2)...; deny-configuration-exact-match configuration; deny-configuration-regexps [“regular expression 1” “regular expression 2 ” ... ]; deny-grpc-rpc-regexps [ deny-grpc-rpc-regexps ... ]; deny-sources [ source-addresses ... ]; deny-times [ times ... ]; idle-timeout minutes; logical-system logical-system-name; login-alarms; login-script login-script; login-tip; no-scp-server; no-sftp-server; permissions [ permissions ... ]; satelliteall; security-role(audit-administrator | crypto-administrator | ids-administrator | security-administrator); tenant tenant-system-name; web-ui-hidden-menus web-ui-hidden-menus; web-ui-read-only-menus web-ui-read-only-menus; }
Hierarchy Level
[edit system login]
Description
Define a login class. All users who log in to the
router or switch must be in a login class. Therefore, you must define
a Junos OS login class for each user or type of user. You can define
any number of login classes depending on the types of permissions
the users need. You may not need to define any login classes; Junos
OS has several predefined login classes, to suit a variety of needs.
However, the predefined login classes cannot be modified. If you define
a class with the same name as a predefined class, Junos OS appends -local
to the login class name and creates a new login class.
See Predefined System Login Classes for more information.
Options
class-name |
A name you choose for the login class. |
||||||||
access-end |
Specify the end time in
Note:
Access start and end times that span across 12:00 AM starting on a
specified day results in the user having access until the next day,
even if the access day is not explicitly configured on the
|
||||||||
access-start |
Specify the start time in
Note:
Access start and end times that span across 12:00 AM starting on a
specified day results in the user having access until the next day,
even if the access day is not explicitly configured on the
|
||||||||
( allow-commands | allow-commands-regexps ) |
Specify one or more regular expressions to allow users in this class to
issue operational mode commands. You use the
For the For the The Note:
The Authorizations can also be configured remotely by specifying Juniper Networks vendor-specific TACACS+ attributes in your authentication server's configuration. For a remote user, when the authorization parameters are configured both remotely and locally, authorization parameters configured remotely and locally are both considered together for authorization. For a local user, only the authorization parameters configured locally for the class are considered.
|
||||||||
( allow-configuration | allow-configuration-regexps ) |
Specify one or more regular expressions to explicitly allow users in
this class to access the specified levels in the configuration hierarchy
even if the permissions set with the For the For the The Note:
The
|
||||||||
allow-configuration-exact-match |
This option uses complete hierarchy strings and wildcards in addition to
regular expressions. Specify a hierarchy including The If you set the same configuration for both
|
||||||||
allow-grpc-rpc-regexps |
Specify one or more regular expressions to explicitly allow users in this class to execute matching GRPC RPCs For the The
|
||||||||
allow-hidden-commands |
Allow all hidden commands to be run. If the no-hidden-commands statement
is specified at the
|
||||||||
allowed-days [ days of the week ] |
Specify one or more days of the week when users in this class are allowed to log in.
|
||||||||
cli |
Set the CLI prompt specified for the login class. If a CLI prompt is also set at the [edit system login user cli] hierarchy level, the prompt set for the login user has precedence over the prompt set for the login class.
|
||||||||
configuration-breadcrumbs |
Enable the configuration breadcrumbs view in the CLI to display the location in the configuration hierarchy. For an example of how to enable this view, see Enabling Configuration Breadcrumbs . |
||||||||
confirm-commands |
Specify that confirmation for particular commands is explicitly required and, optionally, specify the wording of the message displayed at confirm time. You can specify the commands using a list of regular expressions or commands.
|
||||||||
( deny-commands | deny-commands-regexps ) |
Specify one or more regular expressions to explicitly deny users in this
class permission to issue operational mode commands, even though the
permissions set with the For the For the Expressions configured with the Note:
The Authorizations can also be configured remotely by specifying Juniper Networks vendor-specific TACACS+ attributes in your authentication server's configuration. For a remote user, when the authorization parameters are configured both remotely and locally, authorization parameters configured remotely and locally are both considered together for authorization. For a local user, only the authorization parameters configured locally for the class are considered.
|
||||||||
( deny-configuration | deny-configuration-regexps ) |
Specify one or more regular expressions to explicitly deny users in this
class access to the specified levels in the configuration hierarchy even
if the permissions set with the For the For the Expressions configured with
Note:
The
|
||||||||
deny-configuration-exact-match |
This option uses complete hierarchy strings and wildcards in addition to
regular expressions. Specify a hierarchy including The If you set the same configuration for both
Configurations that are denied with
|
||||||||
deny-grpc-rpc-regexps |
Specify one or more regular expressions to prevent users in this class from running matching GRPC RPCs For the The
|
||||||||
idle-timeout |
For a login class, configure the maximum time in minutes that a session can be idle before the session times out and the user is logged out of the device. The session times out after remaining at the CLI operational mode prompt for the specified time. Note:
After the user logs in to a device from a shell prompt such as csh, if the user starts another program to run in the foreground of the CLI, the idle-timer control is stopped from being computed. The calculation of the idle time of the CLI session is restarted only after the foreground process exits and the control is returned to the shell prompt. When the restart of the idle-timer control occurs, if no interaction from the user occurs on the shell, the user is automatically logged out after the time set on this statement.
|
||||||||
login-alarms |
Display system alarms when a user with |
||||||||
login-script |
Run the specified op script when a user belonging to the class logs in to the CLI. The script must be enabled in the configuration. |
||||||||
logical-system |
Assign the users in this login class to a logical system. If you specify a logical system, you can’t include the satellite configuration statement in the configuration for this login class. |
||||||||
login-tip |
Display CLI tips when logging in.
|
||||||||
no-hidden-commands |
Deny all hidden commands, except for those specified, for users in this login class. Each command listed as an exception must be enclosed in quotation marks.
|
||||||||
no-scp-server |
Disable incoming SCP connections for this login class. |
||||||||
no-sftp-server |
Disable incoming SFTP connections for this login class. |
||||||||
permissions |
Specify login access privileges for the login class.
|
||||||||
satellite |
Specify access to Junos Fusion satellite devices for the login class. All users assigned to the login class are satellite users. If you include this statement, you can’t include the logical-system configuration statement in the configuration for this login class.
|
||||||||
security-role |
Specify one or more Common Criteria (ISO/IEC 15408) security roles for the login class.
|
||||||||
tenant |
Assign the users in this class to a tenant system. Tenant systems are used when you need to separate departments, organizations, or customers and each of them can be limited to one virtual router. The main difference between a logical system and a tenant system is that a logical system supports advanced routing functionality using multiple routing instances. In comparison, a tenant system supports only one routing instance, but supports the deployment of significantly more tenants per system. |
||||||||
web-ui-hidden-menus |
Enable hidden menus in the J-Web interface. |
||||||||
web-ui-read-only-menus |
Enable read-only menus in the J-Web interface. |
Required Privilege Level
admin—To view this statement in the configuration.
admin-control—To add this statement to the configuration.
Release Information
The class
, allow-commands
, deny-commands
, allow-configuration
, deny-configuration
, idle-timeout
, login-alarms
, login-tip
, and permissions
statements were introduced before Junos
OS Release 7.4.
All of the previously mentioned statements were introduced in Junos OS Release 9.0 for the EX Series.
The login-script
statement was introduced in Junos
OS Release 9.5.
The access-end
, access-start
, and allowed-days
statements were introduced in Junos OS Release
10.1.
All of the previously mentioned statements were introduced in Junos OS Release 11.1 for the QFX Series.
All of the previously mentioned statements were introduced in Junos OS Release 11.2 for the SRX Series.
The allow-configuration-regexps
, deny-configuration-regexps
, and security-role
statements were introduced in Junos
OS Release 11.2.
The configuration-breadcrumbs
statement was introduced
in Junos OS Release 12.2.
All of the previously mentioned statements were introduced in Junos OS Release 14.1X53-D20 for the OCX Series.
All of the previously mentioned statements were introduced in Junos OS Release 15.1X49-D70 for the vSRX Virtual Firewall, SRX4100, SRX4200 and SRX1500 devices.
All of the previously mentioned statements were introduced in Junos OS Release 16.1 for the MX Series and PTX Series.
The allow-hidden-commands
, confirm-commands
, no-hidden-commands
, and satellite
statements
were introduced in Junos OS Release 16.1.
The cli
statement was introduced in Junos OS Release
17.3.
The allow-commands-regexps
and deny-commands-regexps
statements were introduced in Junos OS Release 18.1.
The tenant
statement was introduced in Junos OS 18.4.
The no-scp-server
and no-sftp-server
statements
were introduced in Junos OS Release 19.2.
The web-ui-hidden-menus
and web-ui-read-only-menus
statements were introduced in Junos OS 21.3 for the SRX platforms.