Created on
12-24-2025
09:39 AM
Edited on
01-05-2026
10:34 PM
By
Jean-Philippe_P
| Description |
This article describes how to ensure PBKDF2 is used to hash administrator passwords after upgrading FortiOS. |
| Scope | FortiGate v7.2, v7.4, v7.6. |
| Solution |
Starting from FortiOS v7.2.11, 7.4.8, and 7.6.1, the hash function used to securely store firewall administrator credentials in configuration is updated from SHA256 to PBKDF2.
Example configuration after upgrade (FortiOS v7.2.11): In this example, the built-in administrator 'admin' has already logged in to the firewall successfully, so the associated credential was automatically updated.
config system admin edit "admin" <----- Default admin. set accprofile "super_admin" set vdom "root" set password ENC PB2Ow+O8B -----snip----- <----- PBKDF2. next edit "test_super_admin" set accprofile "super_admin" set vdom "root" set password ENC SH2aZtOA -----snip----- <----- SHA256, same as previous firmware. next edit "test_prof_admin" set accprofile "prof_admin" set vdom "root" set password ENC SH2r7JR7v -----snip----- <----- SHA256, same as previous firmware. next end To enforce a PBKDF2 hash for all administrators:
FortiGate # config system admin FortiGate (admin) # edit test_super_admin FortiGate (test_super_admin) # set password <new_password> FortiGate (test_super_admin) # show
config system admin edit "test_super_admin" set accprofile "super_admin" set vdom "root" set password ENC PB2N/Htll -----snip----- <----- PBKDF2. next end FortiGate (test) # next FortiGate (admin) # end
Note: For backwards compatibility, by default the previous SHA256 hashes remain stored in the hidden 'old-password' setting after the password setting is updated to a PBKDF2 hash. The 'old-password' setting is not visible to administrators logged in to the firewall, but can be observed in a configuration backup taken by a super_admin.
config system admin edit "admin" set old-password ENC SH2G6rKGG -----snip----- <----- SHA256. set accprofile "super_admin" set vdom "root" set password ENC PB2Ow+O8B -----snip----- <----- PBKDF2. next ... end
To fully remove SH2 hashes stored in old-password, enable the 'login-lockout-upon-weaker-encryption' setting in system password-policy. A warning shows asking the administrator to confirm the configuration change. In FortiOS v7.2.x and v7.4.x, the equivalent setting is 'login-lockout-upon-downgrade'.
config system password-policy set login-lockout-upon-weaker-encryption enable end
Related documents: New features or enhancements 7.2.11 |
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 2026 Fortinet, Inc. All Rights Reserved.