I'm looking into encrypting my home folder with Truecrypt, and mounting it after I've logged in, which should be pretty straightforward. However, it occurred to me that it should be theoretically possible to mount it as I'm logging in, as long as my account password is the same as my Truecrypt password. Is there a way to get PAM to run a command on login and pass the command my password as an argument? Or is there some other way to accomplish the same effect, without me needing to provide the password multiple times?
Here is a tutorial for PAM and truecrypt combination: http://blog.littleimpact.de/index.php/2008/08/19/automatic-encryption-of-home-directories-using-truecrypt-60a/