Pam_Mysql Version 0.4.5

To try this, you need PAM to already be installed and working and have a
MySQL server up and running as well. I typically copy the pam_mysql.so to
/lib/security and make the proper changes to /etc/pam.d/ and /etc/pam.conf

An example of a config file:
auth       optional     pam_mysql.so user=root passwd=password
account    required     pam_mysql.so user=root passwd=password

The options that it understands are: Defaults are in () 

user(nobody) -- The user with access to the open the connection to mysql
and has permission to read the table with the passwords.

passwd("") -- Password for the same.

host(localhost) -- Machine that is running the sql server

db(mysql) -- database that contents the table with the user/password
combos

table(user) -- table that you want to use for the user/password checking

usercolumn(User) -- column that has the username field

passwdcolumn(password) -- column that has the password field 

crypt(0) -- Used to decide to use MySQL's PASSWORD() function or crypt()
            0 = No encryption. Passwords in database in plaintext. NOT recommended!
            1 = Use crypt
            2 = Use MySQL PASSWORD() function

where("") -- Used to specify additional criteria for the query. For example;
	where=enabled=1
	Note, the where can NOT contain any spaces in this release and
	currently, only number columns appear to work. Both these problems
	will be investigated in due course :)

BUGS
Users names and passwords are logged in the clear to mysql.log if you log
select statements... Current solution, don't log select statements. (Not
sure why you'd want to anyway, slogs your system down badly!)
