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.
dbabic
Staff
Staff
Article Id 198030
Description
This article describes how to run show, diagnose, execute, get cli commands of another vdom and global mode (config global) from another vdom.

Solution
Sometimes it is convenient to run show, diagnose, execute, and get cli commands without switching to global mode and to another vdom.
On a FortiGate it is possible it run show, diagnose, execute, get cli commands by using “sudo” command:
# config  vdom 
# edit root
fgvm04 (root) # sudo ?
<global/vdom-name>    global or virtual domain name
global
VDOM1
root
For example, it is not possible to run “execute ping” commands on the global mode and in order to ping it is needed to switch to vdoms. However, this command can be run on the global mode by using “sudo” command:
# config  global

# execute ping 8.8.8.8
 
command parse error before 'ping'
Command fail. Return code -61

# sudo root execute  ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=55 time=1.9 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=1.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=1.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=1.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=1.8 ms
 
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 1.7/1.8/1.9 ms



Contributors