We help IT Professionals succeed at work.
Get Started
Troubleshooting Question

how do I pass a username and password to a command argument? IE user=Robert, password=adm1234 command argument=open this is a Ubuntu environment

Last Modified: 2021-02-24
I have a Linux program that uses a username and password each time it is run also a server name that must be given:
openvpn /etc/openvpn/name of server <enter>
username  username <enter>
password password <enter>

I would like a bash script that I preprogram the username and password and server name such that I can execute the script on demand

Thank you

Watch Question
This question hasn't been answered yet.
While you wait, find out how you can maximize your capability with the most trusted tool in IT.
Explore More Ask a Question
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE