How to remember password in FortiClient VPN?

Vpn

Vpn Problem Overview


The last version of FortiClient asks me about my password every time. How can I make the program to remember it and who faces a similar problem?

Does anyone have a solution?

Vpn Solutions


Solution 1 - Vpn

  1. Open FortiClient console.
  2. Press button Backup in System section.
  3. Save your configuration in vpn.conf file (No password).
  4. Open vpn.conf in text editor.
  5. Find string: <show_remember_password>0</show_remember_password>
  6. Modify to: <show_remember_password>1</show_remember_password>
  7. Save changes.
  8. Press button Restore in System section FortiClient console.
  9. Select your changed vpv.conf file. Now you can see Save Password checkbox and you can save your password.

Solution 2 - Vpn

I had the same issue in OSX (Sierra) using Forticlient 5.4.1.I ended up editing the following file: [May be in a different location for you depending how app was installed - look at long answer below if it doesn't exist]

sudo vim /Library/Application\ Support/Fortinet/FortiClient/conf/vpn.plist

To change the following two zeroes to ones:

...
<dict>
        <key>YOUR_VPN_CONNECTION_NAME_HERE</key>
        <dict>
                <key>AllowAutoConnect</key>
                <integer>1</integer>
                <key>AllowKeepRunning</key>
                <integer>0</integer>
                <key>AllowSavePassword</key>
                <integer>1</integer>
...

Save and then simply open again and the checkboxes to save will be available now, unlike before.

You could also use the same thing to save some vpn settings for auto rollout of machines by script (instead of manual setup for each user)

For those interested, the way I found it was simple:

  1. Open Forticlient Console

  2. In terminal run "sudo opensnoop | grep Forti"

  3. In forticlient console quickly add a new vpn

  4. (CNTl-C) terminal and then search through output

  5. File above was most obvious sounding one and quick look showed a good outlook.

  6. Edit as above and it works.

Solution 3 - Vpn

According to the official documentation, "How to activate Save Password, Auto Connect, and Always Up in FortiClient", the availability of this option (and some others) is decided by the server administrator, using the config setting set save-password enable.

You can currently override this by tampering with the show_* options in the registry; specifically, HLKM\Software\Wow6432Node\Fortinet\Forticlient\sslvpn\<name>\show_remember_password = 1
Then if 'save password' is checked during login, the client will encrypt the password into the DATA1 and DATA2 values, and even though the server may hide the checkboxes again, the saved password will stay. To clear it, edit the connection's settings and switch auth back to 'Prompt on login'.

EDIT: As posted by Igor half a year later, a much more structured solution is to export the config file, alter it and then load it back in. There are various useful settings you might want to tweak. You can also re-use the config file when deploying to multiple hosts or re-installing.

Solution 4 - Vpn

For windows and Forticlient VPN (Not only named Forticlient) 6 or above version:

  1. Open the FortiClient.
  2. Press the config symbol.
  3. Press the button Backup.
  4. Save your configuration in vpn.conf file.
  5. Open your vpn.conf in text editor.
  6. Find the string: show_remember_password (it must be 0)
  7. Modify to: 1
  8. Find the string again show_remember_password under user_configuration.
  9. Modify to: data="1"
  10. Save changes.
  11. Find button Restore under config again.
  12. Firstly, click lock icon(this button enable to restore operation) and then click restore.
  13. Select your changed vpn.conf file. Now you can see Save Password checkbox and you can save your password.
  14. This checkbox may be disappear after first using. Don't worry, if your password changes, do it again these steps.

Solution 5 - Vpn

FortiClient 6.4: In Windows regedit, go to

Computer\HKEY_CURRENT_USER\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\<vpn name>

and set the value of show_remember_password to 1.

Solution 6 - Vpn

For Linux you may use forticlientsslvpn_cli with Expect to feed in the password.

A complete solution available here:

https://gist.github.com/azizasm/e216bc47b54f5b68405f3c8f8b832e8a

Note: this solution will auto reconnect the if the VPN get disconnected.

Solution 7 - Vpn

I have tried editing the configuration file and restoring but the switch resets itself after a connection has been made as described above. I have also edited the registry at Computer\HKEY_CURRENT_USER\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels<vpn name> to ensure a key SavePass exists with a value of 1 but that also does not persist. This is on version 6+ of Forticlient. However on version 5.2.5.0658 I found that editing the config file AND editing the vpn connection details and removing the 'Description' field I can then enter a password and tick the save password. This is remembered after disconnecting and persists provided you don't shutdown Forticlient.

Solution 8 - Vpn

For FortiClient VPN 6.4.3, seems like you have to

  1. modify the user configuration section within the *.conf" file or
  2. add a save_password node to the ui section in your *.conf file.

I'll detail option 1.:

Open FortiClient VPN

Export your *.conf file:

  1. Click the gear icon (second icon) on the upper-right
  2. Click Backup
  3. In the file dialog box, indicate the file to output your *.conf
  4. Ensure the "Include user settings" is checked
  5. Indicate a password for encrypting the *.conf file. This password is used simply to encrypt sensitive info for exporting/importing the *.conf file.
  6. Open the *.conf file in a text editor.
  7. 7 At the bottom of the file, in the user_configuration section, set show_remember_password key to 1:
  8. Save the *.conf file.

Import your *.conf file:

  1. Click the padlock icon on the upper-right. This must be done to Restore *.conf file
  2. Click the Restore button
  3. Indicate the File and password (used to encrypt the *.conf file in the 'Export conf file' section)
  4. Click OK

This did the trick for me. Also, it appears once this was done, a "save_password" element was added to the conf file, if exported again: connections > connection > ui section of the *.conf file, with a value of 1:

<ui>
    <show_alwaysup>0</show_alwaysup>
    <show_autoconnect>0</show_autoconnect>
    <save_username>0</save_username>
    <save_password>1</save_password>
    <show_remember_password>0</show_remember_password>
</ui>

Solution 9 - Vpn

in Windows, if you use register editor, and search HKEY_CURRENT_USER\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels<VPN_NAME>, you'll se a show_remember_password entry with a value of "0". If you change this value to "1", you will be able to save your password for latter use...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionArtem KhaustovView Question on Stackoverflow
Solution 1 - VpnIgorView Answer on Stackoverflow
Solution 2 - VpnMatt McGlinnView Answer on Stackoverflow
Solution 3 - VpntheultramageView Answer on Stackoverflow
Solution 4 - VpnEmir KılınçView Answer on Stackoverflow
Solution 5 - VpnMarkus PscheidtView Answer on Stackoverflow
Solution 6 - VpnAzizSMView Answer on Stackoverflow
Solution 7 - VpnNelsonView Answer on Stackoverflow
Solution 8 - VpnMattView Answer on Stackoverflow
Solution 9 - VpnRuben AjrasView Answer on Stackoverflow