FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
hslee_FTNT
Staff
Staff
Description
This article explains how to enter a VDOM to execute commands without exiting the current VDOM.

Solution
CLI command, #sudo, allows the running of global commands from within the VDOM context of the CLI.

This means that the user no longer has to:

- Exit from the VDOM
- Enter global   
- Run the command
- Return to the previous VDOM

These commands will only work if the user already has permissions to run the command.
Unlike the #sudo command in some other operating systems like Linux, this command does not allow the user to run programs with the privileges of another user.

The syntax for the command is:

#sudo {global | vdom-name} {diagnose | execute | show | get}

i.e)
# config vdom
(vdom) # edit TP
current vf=TP:1
(TP) # sudo global show system ha
config system ha
    set group-id 10
    set group-name "fgcp"
    set mode a-p
    set hbdev "port31" 50
    set session-pickup enable
    set ha-mgmt-status enable
    set ha-uptime-diff-margin 3
    set override disable
    set priority 200
    set monitor "port1" "port2"
end

Contributors