theinvisible / openfortigui

VPN-GUI to connect to Fortigate-Hardware, based on openfortivpn
https://hadler.me/linux/openfortigui/
GNU General Public License v3.0
490 stars 54 forks source link

Ubuntu 18.04. App always ask password even password was filled. #101

Closed linelect closed 4 years ago

linelect commented 4 years ago

After ubuntu 18.04 update (not sure that this is true reason but earlier I did not fill password every connect) openFortiGUI 0.7 version always ask password in new window. I've updated openFortiGUI to 0.8.1 version but it did not help.

After edit and adding password using gui I can see in /home/username/.openfortigui/vpnprofiles/nameOfConnection.conf that password is in the config file:

[vpn]
password="encoded_password"

But when I try to connect app ask for password: image

log:

груд. 15 20:00:51 openfortiGUI::Debug: "start-vpn process::" "connection_name"
груд. 15 20:00:51 openfortiGUI::Debug: "start-vpn process::config_file::" "/home/username/.openfortigui/main.conf"
груд. 15 20:00:51 openfortiGUI::Debug: vpnProcess::startVPN::slot
груд. 15 20:00:51 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/username/.openfortigui/vpnprofiles/connection_name.conf"
груд. 15 20:00:51 openfortiGUI::Debug: passstore requested from vpn
груд. 15 20:00:52 openfortiGUI::Debug: server sent something::
груд. 15 20:00:52 openfortiGUI::Debug: server api command2:: 8 ::name:: "connection_name"
груд. 15 20:00:54 openfortiGUI::Debug: server sent something::
груд. 15 20:00:54 openfortiGUI::Debug: server api command2:: 4 ::name:: "connection_name"
груд. 15 20:00:54 openfortiGUI::Debug: vpnWorker::process::slot
груд. 15 20:00:54 openfortiGUI::Debug: shutting down vpn process:: "connection_name"

How I can fix it?

boospy commented 4 years ago

If you create the same connection again, did this solve the problem?

linelect commented 4 years ago

If you create the same connection again, did this solve the problem?

It did not help me.

theinvisible commented 4 years ago

Hi, the string "passstore requested from vpn" says you are using the password manager which can be enabled/disabled in main preferences. Try disable it and try again.

linelect commented 4 years ago

Hi, the string "passstore requested from vpn" says you are using the password manager which can be enabled/disabled in main preferences. Try disable it and try again.

It was disabled, tried enable and get error: image

theinvisible commented 4 years ago

Seems like your password manager is broken from your update, please try to fix this first. Also there seems a bug that you cannot disable the password manager when its broken, will look into this. As a workaround you can manually edit your config file in ~/.openfortigui/main.conf and set "use_system_password_store" to false

linelect commented 4 years ago

Seems like your password manager is broken from your update, please try to fix this first. Also there seems a bug that you cannot disable the password manager when its broken, will look into this. As a workaround you can manually edit your config file in ~/.openfortigui/main.conf and set "use_system_password_store" to false

I've fixed problem with password manager but it did not help me. use_system_password_store is false Tried re-create connection, no results.

Flow: 1) Edit connection, set password and press save. 2) Go to /home/username/.openfortigui/vpnprofiles/nameOfConnection.conf and see password is filled. 3) Try to connect. Then app shows window 'Please enter you login details'. 4) Open connection for editing and see that passwrod field is empty whereas in config file still present.

linelect commented 4 years ago

New portion of logs. What i did: Just tried edit connection, set password and press save. Then tried connect. App asked password in new window. I closed login window.

connectionName.log:

140581221357568:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:537: INFO: Start tunnel. INFO: Connected to gateway. ERROR: Could not authenticate to gateway (HTTP status code). INFO: Closed connection to gateway. INFO: Logged out.

openfortigui.log:

січ. 22 22:17:29 openfortiGUI::Debug: "start-vpn process::" "epi" січ. 22 22:17:29 openfortiGUI::Debug: "start-vpn process::config_file::" "/home/linelect/.openfortigui/main.conf" січ. 22 22:17:29 openfortiGUI::Debug: vpnProcess::startVPN::slot січ. 22 22:17:29 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/linelect/.openfortigui/vpnprofiles/epi.conf" січ. 22 22:17:33 openfortiGUI::Debug: server sent something:: січ. 22 22:17:33 openfortiGUI::Debug: server api command2:: 4 ::name:: "epi" січ. 22 22:17:33 openfortiGUI::Debug: vpnWorker::process::slot січ. 22 22:17:33 openfortiGUI::Debug: shutting down vpn process:: "epi"

theinvisible commented 4 years ago

Hi, seems something wrong with your encryption key or the encrypted data. The problem then is the program can not decode the password and so asks for it.

The best solution would be to start with a fresh profile. To do so close OpenFortiGUI, move your ~/.openfortigui folder somewhere else and start the program again.

linelect commented 4 years ago

Hi, seems something wrong with your encryption key or the encrypted data. The problem then is the program can not decode the password and so asks for it.

The best solution would be to start with a fresh profile. To do so close OpenFortiGUI, move your ~/.openfortigui folder somewhere else and start the program again.

It works! Thank you very much!

afperezm commented 3 years ago

Hi, seems something wrong with your encryption key or the encrypted data. The problem then is the program can not decode the password and so asks for it.

The best solution would be to start with a fresh profile. To do so close OpenFortiGUI, move your ~/.openfortigui folder somewhere else and start the program again.

Using OpenFortiGUI 0.9.0 this solution worked for me, I moved the ~/.openfortigui folder somewhere else and re-started the program, then it asked me a master key to store passwords and I recreated the connection and it worked perfectly.

Thank you!