Pritunl simple client is great, but it does not come with way to persist username and password for a user. Is there a way to read authorisation data form a file so login window would not have to pop up on every VPN connection?
2 Answers
On MacOS installed pritunl with configured profile for VPN network go to:
cd /Users/[user1]/Library/Application\ Support/pritunl/profiles/[profile_hash].ovpn
where profile_hash - would be alphanumeric hash like 028c16f93c....c6258 and user1 - your user obviously
Open it in your editor and find line, with auth-user-pass and add path to file containing you authorisation credentials
auth-user-pass /Users/user1/directory-to-keep-vpn-profile-data/auth.txt
As Mat J pointed out: windows users may need to escape the backslash in the path with double backslash)
auth.txt should be a plain txt file with just 2 lines:
username
password
You should restart pritunl app now in case if it was on. If everything is valid login window should not appear but app should use your authorisation data! You can use debug option in case of any problems. Usually it would be that you path to the file is wrong or auth file contains some whitespace like characters that affect your entry.
Keep in mind that your authorisation file is plain file. With solution above, your VPN account will be only as safe as account on machine where you put that file is.

- 2,820
- 1
- 28
- 32
-
A sidenote for windows users with same question, you need to escape the backslash in the path with double backslash. β Mat J Mar 15 '21 at 17:00
To add to the first answer. The auth.txt file might need to have its premissions changed on a mac, tho I don't know what perssimisions.

- 47
- 1
- 8
-
As itβs currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). β Community Mar 02 '22 at 16:23
-
This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31195411) β Ajoe Mar 08 '22 at 09:29