pam_mysql

=Authentication using MySQL Database= Main Menu

pam_mysql
This module allows users to authenticate using a MySQL database. It is useful on a network with many users logging into difference machines. A main user database holds the password information for the users.


 * **Authentication**: "who are you, and how do I know that it's you?" (login and password)
 * Standard scheme based on the "/etc/passwd" and "/etc/shadow" files
 * Kerberos to handle authentication
 * LDAP for authentication and authorization


 * **Authorization:** "now that I know you, what are you allowed to do on this machine?"

Pre-requisite**:** Installation and configuration of the MySQL database.
 * Configuration**
 * **Download the pam_mysql module**
 * pam_mysql-0.7RC1.tar.gz


 * **Untar the tar file**
 * tar -xvzf pam_mysql-0.7RC1.tar.gz


 * **Modify the pam_mysql.c file**
 * Added simple changes to the login/password prompts


 * **Run configure script**
 * ./configure
 * ./configure --with-pam=/usr/local --with-mysql=/usr/local/bin/mysql_config


 * **Make install**


 * **Modify proper /etc/pam.d configuration file**
 * account required pam_mysql,so
 * auth required pam_mysql.so


 * Issues**
 * I encountered problems with yum from the default installation. The repo file in /etc/yum.repos.d directory was pointing to a location at Oracle that is only accessible to customers. I had to download a yum configuration file that pointed to a public server. Once this change was made I was able to use yum in a limited capacity (many repos are behind a firewall for customers who have purchased RHEL5 and maintain a support contract). I was not able to issue the //yum install pam_mysql// command. Instead I attempted to configure and install the module manually.
 * I could not get //configure// script to execute successfully. I first ran it without an parameters and received the following error message: **configure:27320: error: Cannot find pam headers. Please check if your system is ready for pam module development.**
 * I verified that the //pam.i386// file was installed on the system. One reference online indicated the error may be a result of pam not being setup.
 * I attempted to install the pam-devel package that contains files and libraries for PAM development. This could have been the cause of the error that I got while running the //configure// script. I get an error resolving dependencies. The message indicated that a different version of PAM should be installed. I downloaded the corresponding version of PAM and attempted to install the pam-devel package again. Each time I got the dependency error.

@https://support.asperasoft.com/entries/20150697-getting-pam-to-authenticate-against-mysql @http://www.delouw.ch/linux/Postfix-Cyrus-Web-cyradm-HOWTO/html/install.html
 * Resources**