Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents

allow-commands (Op Scripts)

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
allow-commands “regular-expression”;

Hierarchy Level

content_copy zoom_out_map
[edit system scripts op file filename]

Description

Specify a regular expression that defines which operational mode commands to explicitly allow during execution of a local op script.

By default, when a user executes a script, the system does not permit the user to execute operational mode commands within a script for which their login class does not normally have permission to execute. You can explicitly enable the script to execute certain operational mode commands regardless of the permissions of the user invoking the script.

Note:

The allow-commands statement does not support executing configuration mode commands.

Note:

Remote op scripts that are executed using the op url command do not support executing unauthorized operational mode commands even when you configure the allow-commands statement.

Required Privilege Level

maintenance—To view or add this statement in the configuration.

Release Information

Statement introduced in Junos OS Release 14.2.

footer-navigation