If you have many machines that have the same set of users on them, it doesn't make sense to have user identity information on each of them. How can you unify this information? There are two ways I know of (I am sure there are more): LDAP and libnss-mysql.

In this tutorial I will talk about libnss-mysql.

Using libnss-mysql to authenticate linux shell users is easy! Just install libnss-mysql, then add mysql to /etc/nsswitch.conf. You will need to edit the nss-mysql.conf and nss-mysql-root.conf files to match your database. We use a custom database schema, but you can use the one that comes with the package.

But how do you link all the machines to use the same database? We use stunnel. In this situation, there is a tricky workaround for getting it to work, see stunnel documentation? for more information.

Related Links: http://libnss-mysql.sourceforge.net/

PAM! I finally got apache2 and pam to connect to mysql. Took long enough! Ugh. I did learn a bunch though: namely pam is a good thing! I ran into this error and had a difficult time squashing it: couldn't check access. No groups file? - ARGH. Probably a module missing.

http://pam-mysql.cvs.sourceforge.net/pam-mysql/pam_mysql/Readme?revision=1.1.4.9&view=markup http://pam.sourceforge.net/mod_auth_pam/faq.html http://www.ma.utexas.edu/users/stirling/computergeek/mysqluser.html http://www.weltraumsofa.de/pam_mysql/doku_pamnssmysql_jh_en.pdf http://www.jameslinden.com/2006-04-12/pam_mysql-07rc1/