Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following configured in /etc/network/interfaces:

 iface companyvpn inet manual
 openvpn company

This allows me to:

 ifup companyvpn

But unfortunately I am unable to provide my credentials as it appears to stop/place the process in the background?

 ifup companyvpn 
 Starting virtual private network daemon: companyEnter Auth Username:
 [1]+  Stopped                 ifup companyvpn

Any ideas how to allow the acceptance of username and password at the prompt?

share|improve this question

I resolved this issue by supplying my user credentials directly.

The line in /etc/openvpn/client.conf:

auth-user-pass /etc/openvpn/client.cred

The file takes the format of:


Make sure you watch the file permissions though! 600 should be adequate.

Ran ifup and everything worked:

ifup companyvpn
Starting virtual private network daemon: company.
share|improve this answer
Just a side note, it seems there is no easy way to encrypt this auth file. Worth looking into though. – Mash Oct 31 '12 at 15:18
I realize this is old, but the reason there isn't a way to encrypt it is because then you'd need to ask for a passphrase to decrypt it. Which wouldn't work. You can, of course, use full-disk encryption, then it will be encrypted. – derobert Jun 5 '14 at 17:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.