PAM plugin not working

Hi, I downloaded percona-pam-plugin source code, compiled and installed it following instructions in http://www.percona.com/doc/percona-pam-for-mysql/installatio n.html. When I tried to install the plugin, it failed:

mysql> INSTALL PLUGIN auth_pam SONAME ‘auth_pam.so’;
ERROR 1127 (HY000): Can’t find symbol ‘auth_pam’ in library

Can someone shed some light on this issue and how to fix it? Thanks.

Hi,

Looks like mysql can’t find auth_pam.so file in shared library. Can you make sure that after installed percona-pam-plugin, the library/plugin directory has got the appropiate permissions? Because as per documentation, file execution permission is also required.

I don’t think that’s the problem. See below:

mysql> show variables like ‘%plugin%’;
±--------------±------------------------------+
| Variable_name | Value |
±--------------±------------------------------+
| plugin_dir | /opt/aurora/mysql/lib/plugin/ |
±--------------±------------------------------+
1 row in set (0.00 sec)

/opt/aurora/mysql/lib/plugin # ls -l auth_pam.*
-rwxr-xr-x 1 root root 33212 Aug 23 20:40 auth_pam.a
-rwxr-xr-x 1 root root 810 Aug 23 20:40 auth_pam.la
-rwxr-xr-x 1 root root 28067 Aug 23 20:40 auth_pam.so

If I look up the symbol table in auth_pam.so, I don’t see the “auth_pam” symbol:
/opt/aurora/mysql/lib/plugin # nm auth_pam.so | grep auth
0000000000001580 t authenticate_user_with_pam_client
0000000000001690 T authenticate_user_with_pam_client_common
0000000000001140 t authenticate_user_with_pam_server
00000000002022a0 d pam_auth_handler
U pam_authenticate@@LIBPAM_1.0
00000000002022c0 d test_pam_auth_handler

Not sure if that’s the problem. Thanks.