I'm having trouble finding where to edit the password of a VPN user that I setup over 5 years ago. I don't know a lot about this stuff and surprised I ever got this working many years ago.

It's a Centos server running OpenVPN - PPTP server whereby the users connect with a simple username and password. The username/password are not the users of the server- I remember they were stored literally in plain text in a file in the form of {username}:{password}.

I can't remember where this file is stored! Any ideas how to find it?

My /etc/openvpn/server.conf file looks like this:

local xx.xx.xx.xx
port 1194
proto udp
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
push "route"
client-config-dir /etc/openvpn/client-configs
ifconfig-pool-persist /etc/openvpn/ipp.txt
keepalive 5 30
status 1194.log
verb 5

Are you sure your OpenVPN server is serving your PPTP connections? I ask as officially OpenVPN does not support the PPTP protcol and you would likely need to be using an openvpn client to connect to your openvpn server instead.

Quote from OpenVPN manual:

Does OpenVPN support IPSec or PPTP?

There are three major families of VPN implementations in wide usage today: SSL, IPSec, and PPTP. OpenVPN is an SSL VPN and as such is not compatible with IPSec, L2TP, or PPTP.

Additionally if openVPN was using a username/password based authentication I would expect to see an authentication configuration directive in your config file to assign the login method; as OpenVPN defaults to using certificate based authentication.

My advice: If you are sure you are running PPTP, check if you are running a pptpd daemon that serves these connections. If you are using openvpn, could you update your question with a client configuration file as example, it would help us pinpoint the login methods you are using, but judging by this configuration it is likely certificate based. More information on key generation for your setup can be found here: https://openvpn.net/easyrsa.html , essentially you generate a key, download this and distribute it to any of your users alongside an ".ovpn" configuration file and your public ca certificate.

If you have specific questions about configurations for either pptpd or openvpn feel free to ask.

| improve this answer | |
  • Oh you're right. I think it may be using pop top actually.. Could that be the case? – Lock Feb 22 '17 at 20:04
  • That could be very likely, The guide below seems to point that user configuration might be stored in '/etc/ppp/chap-secrets' by default. gaggl.com/2012/06/installing-poptop-pppd-vpn-serveron-centos-6 – Robin Gould Feb 23 '17 at 11:38
  • Thanks. Found it in /etc/ppp/chap-secrets – Lock Feb 23 '17 at 20:11

Here's how you create a new OpenVPN user:

Go to /etc/openvpn/easy-rsa/2.0

Then, edit with your favorite editor the vars file.

when you finish save the file and run:

source ./vars

Then, run:

./build-key-pass username

Here's an example output:

[root@centolel 2.0]# ./build-key-pass itaitikal
Generating a 1024 bit RSA private key
writing new private key to 'itaitikal.key'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [IL]:
State or Province Name (full name) [SH]:
Locality Name (eg, city) [TelAviv]:
Organization Name (eg, company) [none]:
Organizational Unit Name (eg, section) [changeme]:
Common Name (eg, your name or your server's hostname) [itaitikal]:
Name [itaitikal1]:
Email Address [mail@host.domain]:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/openvpn/easy-rsa/2.0/openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName           :PRINTABLE:'IL'
stateOrProvinceName   :PRINTABLE:'SH'
localityName          :PRINTABLE:'TelAviv'
organizationName      :PRINTABLE:'none'
commonName            :PRINTABLE:'itaitikal'
name                  :PRINTABLE:'itaitikal1'
emailAddress          :IA5STRING:'mail@host.domain'
Certificate is to be certified until Feb 20 15:44:56 2027 GMT (3650 days)
Sign the certificate? [y/n]:y

1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated

Make sure that the CN name is unique, otherwise you won't be able to sign the certificate.

Next, browse to /etc/openvpn/easy-rsa/2.0/keys and take the username.crt, username.key that you've just created and the server's ca.crt, zip them and send them to the user.

The user will have to place them somewhere and point to them in his .ovpn file.

I wrote an article about this whole procedure, so feel free to check it out:


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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