Created on
04-15-2025
08:12 AM
Edited on
04-15-2025
10:50 AM
By
pathik_mehta
This article describes the steps to follow while encountering the issue with updating the Local Admin Account password via CLI.
FortiGate, CLI.
Admin account password can be updated via both GUI and the CLI.
GUI:
For updating the password via GUI, navigate to System -> Administrators -> Select Admin Account -> Change Password.
CLI:
For CLI, run the following command:
config system admin
edit "<admin_username>"
set password <new_password> <old_password>
end
While changing the password via CLI, issue can be encountered when using '\' (backslash) in the password.
The command will run successfully without error and the password will be updated, but while logging from the new password, 'Authentication Failure' error would occur.
Example:
config system admin
edit "Demo_Admin"
set password New\Password Password
end
While logging in with New\Password, the following error occurs:
To fix the following issue when using password with backslash, use "" (Quotations) in command while updating the password:
config system admin
edit "<admin_username>"
set password "<new_password>" "<old_password>"
end
Example:
config system admin
edit "Demo_Admin"
set password "New\Password" "Password"
end
The authentication will be successful with same password containing a backslash.
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.