Hi all, I am trying to implement PAM authentication plugin. I am using Server version: 5.6.15-enterprise-commercial-advanced. I am following these steps:
mysql> show variables like '%plugin%'; +---------------+------------------------+ | Variable_name | Value | +---------------+------------------------+ | plugin_dir | /usr/lib/mysql/plugin/ | +---------------+------------------------+ mysql> INSTALL PLUGIN authentication_pam SONAME 'authentication_pam.so'; Query OK, 0 rows affected (0.00 sec) I verified the same using *show plugins* command. It is there. [root@host1 pam.d]# *cat /etc/pam.d/mysql* #%PAM-1.0 auth include password-auth account include password-auth [root@host1 pam.d]# *cat password-auth * #%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. auth required pam_env.so auth sufficient pam_unix.so nullok try_first_pass auth requisite pam_succeed_if.so uid >= 500 quiet auth required pam_deny.so account required pam_unix.so account sufficient pam_localuser.so account sufficient pam_succeed_if.so uid < 500 quiet account required pam_permit.so password requisite pam_cracklib.so try_first_pass retry=3 type= password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok password required pam_deny.so session optional pam_keyinit.so revoke session required pam_limits.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so auth required /usr/lib/mysql/plugin/authentication_pam.so # useradd user1 # passwd user1 mysql> create user user1 identified with authentication_pam as 'mysql'; Query OK, 0 rows affected (0.00 sec) [root@host1 ~]# mysql -uuser1 -puser1 --enable-cleartext-plugin Warning: Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'user1'@'localhost' (using password: YES) [root@host1 ~]# Best Regards, Geetanjali Mehra Senior Oracle and MySQL DBA Corporate Consultant and Database Security Specialist