Description
Solution
Note:
Starting with v7.2.4, the 'maintainer' account was removed, meaning this method to reset a password will no longer work.
See FortiOS 7.2.4 - Release Notes - Changes in default behavior.
Alternative Method for FortiOS 7.2.4 and Later:
For FortiOS versions 7.2.4 and later, where the maintainer account is no longer available, follow these steps to reset the admin password:
Prerequisites:
Step 1:
Edit the existing configuration using Notepad++.
Turn on the YAML by selecting Language -> YAML from the main menu. This will help collapse the configuration.
Search for 'config system admin' and select '-' symbol in 'config gui-dashboard' line to collapse the gui-dashboard configuration.
Note:
When the back up file is exported, it will be possible to see the super_admin accprofile in the results of the 'config system admin' command. However, the results of the 'config system accprofile' command will not show the super_admin accprofile as it is device-specific.
Step 2:
Do the flash format of the device and load the same firmware version as the one in the existing configuration backup.
Refer to Technical Tip: Formatting and loading FortiGate firmware image using TFTP
Step 3:
Access the device with the default management address 192.168.1.99 and login to the device using the default credentials username: admin /password: <no password>.
Upload the modified configuration file to the FortiGate.
The device will get rebooted and be accessible with the previously configured management ip.
Login to device with using default credentials username: admin / password: <no passoword>
Post-login, reset the admin account password.
Additional info:
If having access to the firewall with another 'super_admin' and want to reset the 'admin' account password that has been lost/forgotten, follow the below steps:
edit "admin"
set accprofile "super_admin"
set vdom "root"
next
end
Restore the config from the existing logged-in 'super_admin', after reboot it will prompt to set the password, and it is possible to set the new password.
Once logged into the FortiGate with the maintainer account (as described below), if the FortiGate is running FortiOS 6.0.3 or later, enter the 'execute factoryreset' command to return the FortiGate to its default configuration.
This can be useful if the admin administrator account is deleted.
In newer versions of the BIOS, expect some changes to the behavior of the maintainer account. These changes will include:
If maintainer is no longer supported by FortiGate and there's an existing copy of backup configuration, resetting the admin password is still possible by following this article.
Prerequisites:
Procedure:
Step 1: Connect the computer to the firewall via the Console port on the back of the unit. In most units, this is done either by a Serial cable or an RJ-45 to Serial cable. Some units use a USB cable and FortiExplorer to connect to the console port.
Resetting a lost admin password for the VM-s using the maintainer account is not possible. However, The admin password reset with the maintainer account works for firewall with Azure VM.
In this case, reverting to a snapshot or re-provisioning the VM and restoring the configuration (without a password for the admin account) is the only solution.
But resetting the Admin password for the VMs in Azure and AWS can be done as shown in the link at the bottom
Step 2: Start the terminal software.
Step 3: Connect to the firewall using the following:
Step 4: The firewall should then respond with its name or hostname. (If it does not, try pressing 'enter').
Step 5: Reboot the firewall. If there is no power button, disconnect the power adapter and reconnect it after 10 seconds. Plugging in the power too soon after unplugging it can cause corruption in the memory in some units.
edit ? <----- Will show all the super_admin accounts.
Related documents:
Remove maintainer account 7.2.4
Installing firmware from system reboot
Reset FortiGate admin password via FortiGate Cloud
Technical Tip: Guide to Resetting Azure FortiGate-VM Password via Azure Cloud Shell and GUI
Technical Tip: AWS FortiGate Password Recovery
Technical Tip: Recommendations and common scenarios for Administrator access on FortiGate
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.