Score:0

passing the credentials to the bash script from external file

vn flag

So I made simple bash script that connects me to the VPN.

I have to enter username and password manually, but I would like to pass the txt or any other file that has my credentials, so that when terminal asks me for username and password - it should just pick them up from the file.

here is how the code looks like now:

sudo openvpn3 session-start --config /home/path-to-config-file.ovpn

after I run this, I get prompt for username and then for the password.

I would like to store those in separate file and fill them automatically.

Can it be done?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.