LP #1521578: mysql client is not authenticating OS user with PAM plugin
Description
Environment
AFFECTED CS IDs
is cloned by
Smart Checklist
Activity
Sveta Smirnova June 7, 2021 at 12:12 PM
This is not a bug. MySQL command line client searches for the directory where client plugins are installed. Value of the server variable plugin_dir is not relevant here. Unfortunately, client cannot default to the correct local directory, because client, unlike the server, does not have option --basedir. Therefore it simply does not know where to find the plugin. This behavior is documented at https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html#option_mysql_plugin-dir
Fernando Laudares Carmagos June 4, 2021 at 9:56 PM
This bug persists to this day, I've just tested it from Percona Server 5.7.31 installed from a tarball, then loading the Percona authentication plugin:
and then creating a database user set to use PAM authentication:
... and nothing else. Then I tried to connect and I got the same error:
It does look like the library is statically linked there. I did the test and copied the dialog.so library, which is used by the PAM plugin, to the aforementioned directory; MySQL no longer complains about the file not being there, but of a missing dependency now:
From a previous comment in this thread:
Looks like you are using binary tarball. Since tarball can be extracted anywhere, where do you expect mysql to look for plugins? There is a --plugin-dir option to specify plugin directory.
plugin_dir is correctly set:
and the target library can be found there:
lpjirasync January 21, 2018 at 2:31 AM
**Comment from Launchpad by: Launchpad Janitor on: 13-02-2016 04:17:27
[Expired for Percona Server 5.6 because there has been no activity for 60 days.]
lpjirasync January 21, 2018 at 2:31 AM
**Comment from Launchpad by: Launchpad Janitor on: 13-02-2016 04:17:26
[Expired for Percona Server 5.5 because there has been no activity for 60 days.]
lpjirasync January 21, 2018 at 2:31 AM
**Comment from Launchpad by: Sergei Glushchenko on: 06-12-2015 02:09:56
Looks like you are using binary tarball. Since tarball can be extracted anywhere, where do you expect mysql to look for plugins? There is a --plugin-dir option to specify plugin directory.
Details
Details
Assignee
Reporter
Labels
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

**Reported in Launchpad by Ramesh Sivaraman last update 13-02-2016 04:17:28
mysql client is not authenticating OS user with PAM plugin. Client is looking dialog.so plugin in default location not in correct base directory.
Testcase
INSTALL PLUGIN auth_pam SONAME 'auth_pam.so';
GRANT ALL PRIVILEGES ON . TO ramesh@'%' IDENTIFIED WITH auth_pam;
./bin/mysql -uramesh -S/Percona-Server-5.6.27-rel75.0-Linux.x86_64/socket.sock -pEnter password:
ERROR 2059 (HY000): Authentication plugin 'dialog' cannot be loaded: /usr/local/Percona-Server-5.6.27-rel75.0-Linux.x86_64/lib/mysql/plugin/dialog.so: cannot open shared object file: No such file or directory
#