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.
Ivan_Sosa
Staff & Editor
Staff & Editor
Article Id 330248
Description This article describes how to resolve the 'unmatched double quote' error seen after trying to add a new service-account-id on the FortiGate CLI.
Scope FortiGate, FortiGateCloud.
Solution The error occurs after applying the following to change or add a new FortiGateCloud user on FortiGate service-account-id:


execute fortiguard-log login <email> <password> <domain>

If quotes ('  ') are used on the account password, the 'unmatched double quote' error message is likely to appear. For example:

execute fortiguard-log login emailexample@gmail.com prueba123"h"1'2'F global
Failed: Error password(-403)
token line: Unmatched double quote.
Command fail. Return code 5

 

This is due to the fact the password used has quotes (prueba123"h"1'2'F), which causes the error message.

It is possible to 'escape' the characters so they are not interpreted literally, and will not interrupt the command.

The command would instead be as follows:


execute fortiguard-log login emailexample@gmail.com prueba123\"h\"1\'2\'F global

There is no longer a 'Unmatched double quote.' error. If the account was real, it would work:

 

escaped.PNG

For more information on this behavior, search the following document for 'Special characters': CLI basics | FortiGate / FortiOS 6.2.0 | Fortinet Document Library.

It is also possible to change the account password and then try again from the FortiGate CLI. For example: 

 

execute fortiguard-log login emailexample@gmail.com prueba123h12F$ global
Request sent.
  
<- A correct registration request has been sent.

 

Related documents: