[DOC]"Installing server-side plugin" contain misleading (wrong) instruction

Bug #988187 reported by Predrag Zecevic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-pam-for-mysql
Fix Released
Medium
Hrvoje Matijakovic

Bug Description

[In:Percona Toolkit Documentation]

Chapter "Installing server-side plugin" contain misleading (wrong) instruction.
Should be:

  mysql> INSTALL PLUGIN auth_pam_server SONAME 'auth_pam.so';

instead:

  mysql> INSTALL PLUGIN auth_pam SONAME 'auth_pam.so';

(luckily, source code contains proper instructions).

Best regards.

Tags: doc

Related branches

affects: percona-toolkit → percona-pam-for-mysql
Changed in percona-pam-for-mysql:
assignee: nobody → Hrvoje Matijakovic (hrvojem)
Revision history for this message
Predrag Zecevic (predrag-zecevic) wrote :

Hi again,

it is also not documented how to compile from source properly (or how it was compiled for rpm).

When i try to use it, i get:

ERROR 2059 (HY000): Authentication plugin 'auth_pam' cannot be loaded: ld.so.1: mysql: fatal: /usr/local/mysql/lib/plugin/auth_pam.so: open failed: No such file or directory

NOTES:
  * Percona plugin rpm installs plugin into: /usr/lib64/mysql/plugin/auth_pam.so
  * I am running MySQL 5.5.23 x86_64 from http://dev.mysql.com/downloads/mysql/5.5.html
  * CentOS 6.2 x86_64

I have tried to compile it myself:

./configure --prefix=/usr/lib64/mysql/plugin --libdir=/usr/lib64/mysql/plugin --disable-static

And i am getting same error.

What is proper way to compile it and use?

Thanks and regards.

Revision history for this message
Predrag Zecevic (predrag-zecevic) wrote :

Of course,

i can create symbolic link, but general solution would be better.

Regards/Pozdrav

Revision history for this message
Predrag Zecevic (predrag-zecevic) wrote :

So, i have update:

it looks like functionality is (somehow) dependent from platform!

A) when i try to connect from Solaris box, i keep getting error (even [client] section is updated):

ERROR 2059 (HY000): Authentication plugin 'auth_pam' cannot be loaded: ld.so.1: mysql: fatal: /usr/lib64/mysql/plugin/auth_pam.so: open failed: No such file or directory

Client box should not care about plugin location on server side, or?

B) if i try from Linux (have similar MySQL packages installed, and i am pasting password which is verified in LDAP):

ERROR 1698 (28000): Access denied for user 'myusr'@'linux-client.fqdn'

and at same time pam_ldap module (with enabled debug) shows (from /etc/log/secure) - note 4 seconds difference:

Apr 25 16:02:59 TEST mysqld: pam_warn(mysqld:auth): function=[pam_sm_authenticate] service=[mysqld] terminal=[<unknown>] user=[myusr] ruser=[myusr] rhost=[linux-client.fqdn]
Apr 25 16:03:03 TEST mysqld: pam_unix(mysqld:auth): authentication failure; logname= uid=101 euid=101 tty= ruser=myusr rhost=linux-client.fqdn user=myusr

C) using Linux client on server box, i can access DB WITHOUT need to specify password !!!

Regards/Pozdrav

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hi Predrag!

Thank you for your bugreport. I think you should report a separate bug with your last comment. Also please provide following information:

1. Which version of plugin are you using? Did you build plugin from source or use packages? Which source tree/revision did you build?
2. Did you install client-side plugin on Solaris box?
3. Which exactly command did you use to create user?
4. Your PAM config for mysqld
5. Output of SELECT USER(), CURRENT_USER(), @@proxy_user; when you authenticated with PAM.

Regards,
Sergei

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

I believe at this part of bug report is related to the fact that PAM uses client-side plugin too.

Predrag, could you see if https://bugs.launchpad.net/percona-pam-for-mysql/+bug/901242 applies to you, at least partially?

Revision history for this message
Predrag Zecevic (predrag-zecevic) wrote : Re: [Bug 988187] Re: [DOC]

Hi,

well. my starting point was documentation (
http://www.percona.com/doc/percona-pam-for-mysql/index.html ) and i hit
problem because it is somehow 'unfinished'...

It took while to find proper command to get plugin activated...

Now, i have following problem:

a) solaris client -> centos server (not working at all, whatever i do)
b) centos client -> centos server (it doesn't complain about plugin
location, but doesn't let me in when i supply correct LDAP password)
c) centos (client on server) - let me in w/o asking for password ?

I think that client s/w should have nothing to do with server side PAM
authentication. NEVER.

So, i will open another ticket.

Thanks you for response.

On 25.04.2012 17:28, Laurynas Biveinis wrote:
> I believe at this part of bug report is related to the fact that PAM
> uses client-side plugin too.
>
> Predrag, could you see if https://bugs.launchpad.net/percona-pam-for-
> mysql/+bug/901242 applies to you, at least partially?
>

--
Predrag Zečević, Technical Support Analyst, 2e Systems GmbH

Telephone: +49 6196 9505 815, Facsimile: +49 6196 9505 894
Mobile: +49 174 3109 288, Skype: predrag.zecevic
E-mail: predrag.zecevic@2e-systems.com

Headquarter: 2e Systems GmbH, Königsteiner Str. 87,
                      65812 Bad Soden am Taunus, Germany
Company registration: Amtsgericht Königstein (Germany), HRB 7303
Managing director: Phil Douglas

http://www.2e-systems.com/ - Making your business fly!

[***]===---
"He don't know me vewy well, DO he?" -- Bugs Bunny

Revision history for this message
Predrag Zecevic (predrag-zecevic) wrote : Re: [DOC]
Revision history for this message
Predrag Zecevic (predrag-zecevic) wrote :

Also,

i am trying to compile plugin myself and i had to create m4 directory on top source tree directory (percona-pam-plugin-0.1) in order to avoid error:

configure: error: cannot find macro directory `m4'

when running ./configure

There are 2 options:
a) fix documentation
b) fix source

Regards.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

@Predrag,

Only building from source is supported (the 0.1 version is old
and deprecated). The bzr checkout builds well (since the bzr
history isn't that deep, checkout is fast).

Regarding:

"""
Chapter "Installing server-side plugin" contain misleading
(wrong) instruction.
Should be:

  mysql> INSTALL PLUGIN auth_pam_server SONAME 'auth_pam.so';

  instead:

    mysql> INSTALL PLUGIN auth_pam SONAME 'auth_pam.so';

    (luckily, source code contains proper instructions)

"""

It is the same reason. I have filed lp:1088203 for this.

Other than the above, are there any other bugs described above
which you are still facing?

summary: - [DOC]
+ [DOC]"Installing server-side plugin" contain misleading (wrong)
+ instruction
Changed in percona-pam-for-mysql:
importance: Undecided → Medium
status: New → Fix Committed
Changed in percona-pam-for-mysql:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.