GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

PAM plugin not working

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        Hi,

        As per this document, http://dev.mysql.com/tech-resources/articles/mysql_i_s_plugi ns_part1-2.html

        "There is a common problem that might occur at this point:
        ERROR 1127 (HY000): Can't find symbol '_mysql_plugin_interface_version_' in library
        If you see a message like this, it is likely that you forgot to include the -DMYSQL_DYNAMIC_PLUGIN option when compiling the plugin. Adding this option to the g++ compile line is required to create a dynamically loadable plug-in."


        Can you try to recompile with -DMYSQL_DYNAMIC_PLUGIN option and install ?

        Comment


        • #5
          Yes, I saw it in the MySQL documentation and did try adding the gcc flag into the Percona makefile. The make process did use the flag but the end result remained the same, it failed with the same error message. Thanks.

          Comment


          • #6
            Actually, the flag is already defined and used in the makefile out of the Percona source package:

            auth_pam_la_CPPFLAGS = -DMYSQL_DYNAMIC_PLUGIN

            Comment


            • #7
              I got it figured out by reading the source code. The documentation had an error on how to install the plugin - it specified the wrong name. The statement should be:

              mysql> install plugin auth_pam_server soname 'auth_pam.so';

              Notice it's "auth_pam_server", not "auth_pam" in the documentation.

              Comment

              Working...
              X