FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
SimranRana
Staff
Staff
Article Id 387715
Description

 

This article describes the steps to follow while encountering the issue with updating the Local Admin Account password via CLI.

 

Scope

 

FortiGate, CLI.

 

Solution

 

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:

 

Untitled picture.png

 

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.