This module provides support for authenticating with SQLite for OpenVPN.
- # cd pam_sqlite3
- # make
- # cp pam_sqlite3.so /lib64/security/
- create pam service
# /etc/pam.d/openvpn
# crypt:
# 0 = No encryption
# 1 = md5
# 2 = sha1
auth required pam_sqlite3.so db=/etc/openvpn/openvpn.db table=t_user user=username passwd=password expire=expire crypt=1
account required pam_sqlite3.so db=/etc/openvpn/openvpn.db table=t_user user=username passwd=password expire=expire crypt=1
- create sqlite3 file
/etc/openvpn/openvpn.db
create table t_user (
username text not null,
password text not null,
active int,
expire text
);