allow-commands (Op Scripts)
Syntax
allow-commands “regular-expression”;
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.
The allow-commands
statement does not support executing configuration mode
commands.
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.