Technical Tip: How to update a password with a space on it with new password also with a space
| Description | This article describes the situation where the old admin password on FortiGate has a space in it and needs to be updated; however, the user wants to establish a new password with a space in it as well. |
| Scope | All FortiGate after upgrading to v7.6.6. |
| Solution | Note: FortiOS v7.6.6 normalizes passwords during input to prevent formatting or parsing errors. This means any leading or trailing spaces are automatically stripped, so a password starting with a space character will not be accepted. This behavior is consistent across both GUI and CLI configuration methods. The security model enforces this rule to prevent authentication mismatches or hidden character issues.
Why are leading spaces not allowed: FortiOS v7.6.6 normalizes passwords during input to prevent formatting or parsing errors. This means any leading or trailing spaces are automatically stripped, so a password starting with a space character will not be accepted. This behavior is consistent across both GUI and CLI configuration methods. The security model enforces this rule to prevent authentication mismatches or hidden character issues.
Enforced Password Policy in FortiOS v7.6.6.
When creating or modifying an admin password: Minimum length: 12 characters. Must include:
The global policy applies to all administrator accounts by default. Logging in with a password that does not meet these requirements will prompt for a new one.
How to Verify or Adjust Password Policy via CLI: FortiGate password policy can be verified with:
show system password-policy
To enforce a custom policy:
config system password-policy set min-number 1 end
Facts:
Solution:
![]() |





