If you are going to unlock that partition at login, doesn't it kinda defeat the point of encrypting it? I forsee the situation of locking the screen and leaving the encrypted partition mounted. In this case, any other user can access the data on the drive (as long as they have access).
You would be better having a script that runs on a flash drive (or some other removable media) and have something like the following in your .bashrc file.
Code:
if [ -e /media/usb/.unlock_me/unlock.sh ] then
sh /media/usb/.unlock_me/unlock.sh
fi
Where .unlock_me is your unlocking script.
This way, you can selectively choose if you want that partition unlocked and a usb key is pretty easy to dispose of if needed. Of course then all your data is gone but hey, its secure.
In the .unlock_me directory you can have your private key and do the unlocking tranparently. I know there are ways that you can play with the automounting system to automount the dirve and unmount it depending on how if the ksy is installed or not.
Bookmarks