First step: Modify the server-side configuration file:
Auth-user-pass-verify/usr/local/openvpn/etc/checkpsw.sh via-env
Client-cert-not-required
Username-as-common-name
Script-security 3
Note: If you add client-cert-not-required, then the user name password is used to authenticate the login, and if not, the certificate and username password are required to double verify the login.
checkpsw.sh Download Address: http://openvpn.se/files/other/checkpsw.sh
The second step: modify the corresponding parameters in the checkpsw.sh, mainly to change the passfile and log_file two variables on it
Step three: Create a new user and password Authentication file, Psw-file (here's the file is server.conf that file, pay attention to storage, path and configuration file when the same)
Vim Psw-file
test123456 (before the user is the password)
Note: Here Psw-file the right, as little as possible.
chmod psw-file
Chown Nobody.nobody Psw-file
Step Fourth: Modify the Client configuration file: client.conf (or Client.ovpn)
Write off these two lines #cert CLIENT1.CRT
#key Client1.key
Add this line again, and you will be prompted to enter your username and password
Auth-user-pass
As shown in figure: (After the change)
Next, we can test the ^_^