# Openvpn Pam_Mysql Doesn't work?



## tad1214 (Jul 16, 2010)

Hello All,

I keep getting the error:

```
Jul 16 16:57:19 houston0 openvpn[14308]: in openpam_load_module(): no pam_mysql.so found
```

when trying to authenticate against openvpn. It works just fine with login, and this config worked fine on a gentoo box.

I installed pam_mysql from ports, I symlinked it to /usr/lib/


```
houston0# ldd /usr/lib/pam_mysql.so 
/usr/lib/pam_mysql.so:
        libmysqlclient.so.16 => /usr/local/lib/mysql/libmysqlclient.so.16 (0x800c00000)
        libz.so.5 => /lib/libz.so.5 (0x800d77000)
        libm.so.5 => /lib/libm.so.5 (0x800e8c000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x800fac000)
        libc.so.7 => /lib/libc.so.7 (0x800647000)
houston0#
```

Googling only shows a bunch of Chinese pages saying they had no luck either. 

Has anyone seen this before?

The pam module I'm using looks like:

```
auth sufficient pam_mysql.so user=user passwd=pass host=mysql.host.net db=somedb table=users usercolumn=usercol passwdcolumn=pascol 
[where=valid=1 AND company=1] sqllog=0 crypt=0 verbose=1
account required pam_mysql.so user=user passwd=pass host=mysql.host.net db=somedb table=users usercolumn=usercol passwdcolumn=pascol 
[where=valid=1 AND company=1] sqllog=0 crypt=0 verbose=1
```

Thanks
-=Tom


----------



## adam (Jul 17, 2010)

I fixed it tom.

http://techtots.blogspot.com/2010/01/openvpn-with-pammysql-usernamepassword.html


----------

