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.
mattchow_FTNT
Article Id 208839
Description This article describe another way to reset admin password if maintainer account also disabled.
Scope FortiGate.
Solution

The most important requirement to reset admin password is user must have latest backup configuration file of FortiGate, then open the configuration file using text editor or notepad, find '# config system admin' section in the configuration file, ' set password' field will be visible and follow with encrypted algorithm as below.

 

config system admin
    edit "admin"
        set accprofile "super_admin"
        set vdom "root"
        set password ENC SH2zVB67Die9HGlNpeOYte0yo1r1Y46dHyL1TUD/RBU/WTMK9kQzqSw9vHcIdQ=
    next
end

It is necessary to change the forgotten or lost password to replace the encrypted algorithm, for example, 'admin' is the password to change, change it as below, and save the configuration file after the change.

 

config system admin
    edit "admin"
        set accprofile "super_admin"
        set vdom "root"
        set password admin
    next
end

 

Then format and reload the image as shown in the guidance link below:

Technical Tip: Formatting and loading FortiGate firmware image using TFTP

 

Then system will boot up with no configuration file, and it is necessary to restore the configuration file, it will be possible to access FortiGate after restoring the configuration.