Page 1 of 1

SOLVED - Debian 7.1 and mysql auth with libpam-mysql

Posted: Tue Oct 01, 2013 1:49 pm
by nellox
Hello,
we had problem with authenticating one openvpn user on a Debian 7.1.0 server with mysqld.

In mysql db, in one db we have a table containing user and password.

We installed the following debian package:

libpam-mysql

Our openvpnserver.conf had the string:
plugin /usr/lib/openvpn/openvpn-auth-pam.so openvpn

In the /etc/pam.d/openvpn we had:
auth sufficient pam_mysql.so user=alfa passwd=xxxxxx host=localhost db=dbopenvpn table=vpn_ad usercolumn=username passwdcolumn=password [where=(expire>=CURRENT_DATE OR expire = 0000-00-00) and active=1] sqllog=0 crypt=0
account required pam_mysql.so user=alfa passwd=xxxxxx host=localhost db=dbopenvpn table=vpn_ad usercolumn=username passwd column=password [where=(expire>=CURRENT_DATE OR expire = 0000-00-00) and active=1] sqllog=0 crypt=0

We found (via mysql debug" that the "account required" string is not able to check the password beacuse it does no more understand the word"passwd".
We solved writing "password" and not "passwd".

Re: SOLVED - Debian 7.1 and mysql auth with libpam-mysql

Posted: Thu Jan 18, 2018 2:35 pm
by spykey
Hi Nellox,
I still cannot get it to work, would you be able to share the content of your file /etc/pam.d/openvpn please?

Thanks