Created on
10-19-2020
12:07 AM
Edited on
03-20-2025
08:26 AM
By
Jean-Philippe_P
Description
This article describes how to disable diagnose command access for specific admin profiles.
In some network management environments, it is important to prevent some admins of FortiGate to avoid from accessing to FortiGate diagnose commands.
Scope
FortiGate.
Solution
To address this requirement, on the FortiOS v6.4, v7.0, and v7.2, the 'Permit usage of CLI diagnostic commands' option has been introduced in GUI under ‘admin profiles’.

The system-diagnostics command in an administrator profile can be used to control access to diagnose commands for global and VDOM-level administrators.
To block an administrator's access to diagnose commands:
Create an admin profile that cannot access diagnose commands:
config system accprofile
edit "nodiagnose"
set system-diagnostics disable
end
Apply the profile to an administrator:
config system admin
edit "nodiag"
set accprofile "nodiagnose"
set vdom "root"
set password ********
end
Log in as the administrator and confirm that others cannot access diagnose commands:

config system accprofile
edit "User"
set cli-diagnose disable
set cli-get enable
set cli-show enable
set cli-exec enable
set cli-config enable
next
end
config system accprofile
edit "User"
set cli-diagnose enable
next
end
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.