If you know me, I use LUKS for a long time. But there was always one thing that kept annoying me: it was not cool, every time I rebooted my computer, to go the the console and manually mount my encrypted hard drives.

I discovered today that there was already a solution: pam-mount. It is a nice PAM module that allows one to have automatically mounted the encrypted devices as soon as you enter your username/password do access your system.

I installed it on Ubuntu (apt-get install libpam-mount) and did a little bit of hacking on /etc/pam.d/common-session and /etc/security/pammount. What impressed me the most is that it worked like a charm on my first attempt! Now I can boot on my computer and GDM, and just put my username and password to access my box!

Of course you need an excellent user password because your hard-drive security depends on his strength.

Just a note…

If after installing and configuring pam_mount you start hitting problems with your cron (cron segfaults everytime) remove pam_mount.

I don’t understand why this happened and I really don’t want to know. I spent 30 precious minutes hacking GDB just to see that the problem was on pam_mount…

About

photo of Ruben Fonseca

My name is Ruben Fonseca. I'm a Computer Science and Systems Engineer from Portugal that loves FLOSS.

I'm currently an Open Source Consultant at Lisbon, Portugal. This blog is about my daily geek life.

You can contact me anytime at or via LinkedIn:

View Ruben Fonseca's profile on LinkedIn

Feeds

Music