#!/bin/sh ########################################################### # checkpsw.sh (C) 2004 Mathias Sundman <mathias@openvpn.se> # # This script will authenticate OpenVPN users against # a plain text file. The passfile should simply contain # one row per user with the username first followed by # one or more space(s) or tab(s) and then the password.
if [ "${CORRECT_PASSWORD}" = "" ]; then echo"${TIME_STAMP}: User does not exist: username=\"${username}\", password=\"${password}\"." >> ${LOG_FILE} exit 1 fi
if [ "${password}" = "${CORRECT_PASSWORD}" ]; then echo"${TIME_STAMP}: Successful authentication: username=\"${username}\"." >> ${LOG_FILE} exit 0 fi
source ./vars NOTE: If you run ./clean-all, I will be doing a rm -rf on /home/your_name/openvpn-ca/keys
./revoke-full client1 Using configuration from /home/yourname/openvpn-ca/openssl.cnf Revoking Certificate 02. Data Base Updated Using configuration from /home/yourname/openvpn-ca/openssl.cnf C = your country, ST = your province , L = your city, O = your org, OU = your unit, CN = client1, name = server, emailAddress = yourname@abc.com error 23 at 0 depth lookup: certificate revoked error client1.crt: verification failed