Resetting a Lost Admin Password on FortiGate
This article outlines the scenario in which access to the FortiGate is required or the password for the admin account needs to be reset, but no one possessing the current password is present.
When you find yourself in a situation where the admin password for a FortiGate device has been lost and no one with the existing password is available, it is crucial to follow a systematic approach to regain access. Below are detailed steps to reset the admin password, ensuring that you can access your FortiGate firewall securely.
Step 1: Prepare for the Reset Process
Before proceeding with any reset actions, ensure you have physical access to the FortiGate device. You will also need:
- A console cable (usually serial) to connect your computer to the FortiGate device.
- Terminal emulation software (like PuTTY, Tera Term, or HyperTerminal) installed on your computer.
Step 2: Connect to the Console
-
Connect the Console Cable: Plug one end of the console cable into your computer and the other end into the console port of the FortiGate unit.
-
Open Terminal Emulation Software: Launch your terminal emulation software and configure it with these settings:
- Baud Rate: 9600
- Data Bits: 8
- Parity: None
- Stop Bits: 1
- Flow Control: None
-
Accessing Console: Once connected, press Enter until you see a login prompt.
Step 3: Reboot the FortiGate Device
-
Reboot Command: If you are logged in as a user with limited privileges or if you are at a prompt without being logged in, type
execute reboot
and confirm when prompted. -
Interrupt Boot Sequence: As soon as the device begins its boot sequence (you may see messages indicating system checks), interrupt this process by pressing
Ctrl + C
. This action should take you into a special mode known as “maintainer mode.”
Step 4: Enter Maintainer Mode
-
Maintainer Mode Prompt: After interrupting, you should see a prompt asking for a maintainer password. The default maintainer password is usually set to
bcpb
or can be found in your documentation if it has been changed. -
Login Using Maintainer Password:
- Type
bcpb
(or your specific maintainer password) and press Enter. - If successful, you’ll gain access to a command line interface.
- Type
Step 5: Reset Admin Password
-
Access Configuration Mode:
- Type
config system admin
and press Enter.
- Type
-
Edit Admin User Settings:
- To modify an existing admin account (usually named “admin”), type
edit admin
and press Enter.
- To modify an existing admin account (usually named “admin”), type
-
Change Password:
- Use the command
set password
replacingwith your desired new password.
- Use the command
-
Save Changes:
- Type
next
followed byend
to save changes and exit configuration mode.
- Type
Step 6: Reboot Device Again
-
After resetting the password, type
execute reboot
again to restart your FortiGate device normally. -
Once rebooted, use your new admin credentials to log in through either web-based management or console access.
Final Considerations
- Ensure that after regaining access, you document any changes made during this process for future reference.
- It’s advisable to review security policies regarding password management and consider implementing two-factor authentication if not already in place.
By following these steps carefully, you should be able to reset a lost admin password on your FortiGate device successfully.
Authoritative Sources Used
- Fortinet Documentation
- Fortinet Knowledge Base
- Network World Articles on Firewall Management