#%PAM-1.0
#
#Pam_Mysql Version 0.4.5
#

auth       optional     pam_mysql.so user=sm passwd=smpasswd host=localhost db=SquirrelMailAuth table=smauth usercolumn=user passwdcolumn=passwd crypt=1
account    required     pam_mysql.so user=sm passwd=smpasswd host=localhost db=SquirrelMailAuth table=smauth usercolumn=user passwdcolumn=passwd crypt=1

#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!)
