Quick and Dirty CAC install on Gutsy Gibbon
I had to mix directions from two webpages I found by googling.
These worked for the most part but there were some minor things which caused frustration (like locating the libcoolkeypk11.so file in Firefox. I couldn't find the file where it was supposed to be, so I had to hunt. Anyway, I made this document up for my future reference but decided to slap it up here in case it helps anyone else. The full directions aren't here, I highly recommend clicking on and reading both the above links thoroughly before using my directions so you can understand better the issues I was having and maybe then it will make some sense to you. However, if you have the SCR 331 USB smart card reader with part no. 904622 (and not an earlier part number), these directions below will probably work just fine for you. Remember, it doesn't have all the inf you might need but serves well as a checklist for me for future installation on another Ubuntu box.
Install pcscd from terminal
Plug SCR 331 USB card reader in USB port and put in your CAC
Initialize pcsc from terminal
sudo apt-get install pcscd pcsc-tools libccid libpcsclite-dev
sudo /etc/init.d/pcscd restart
Light on reader should be flashing now if not, try scan anyway and see what's wrong
Run the pcsc scan from terminal
You should now see the results and at the bottom you'll see something like this:
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
Gemplus GXP3 64V2N
U.S. Department of Defense Common Access Card (DoD CAC)
If your card is not identified, you will see something like this:
If you do see the latter result from above than copy the text
wget http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt ?output-document=/home/gniibe/.smartcard_list.txt
into your terminal and it will get the latest card info. Then run the pcsc scan again. If your card is in the updated list, you should see something akin to the first result above when doing the scan (I had this problem with a CAC and this worked for me).
Install Coolkey from Synaptic
My recommendation is don't bother trying to install it manually through the terminal or getting the deb package. It's in the Gutsy repository so just install it in that manner. Open System > Administration > Synaptic Package manager. Search for coolkey. Mark it for upgrade and apply. It will download one additional dependency. Close out Synaptic after installation.
Install authentication for Firefox
From within Firefox, Edit-> Preferences -> Advanced -> Encryption.
Click Advanced Tab
Click ?Security Devices? button
Click ?Load? button
Type ?CAC Module? in module name
Browse to the file ?/usr/lib/pkcs11/libcoolkeypk11.so? and click OK and OK again. (File might also be in /usr/local
Install DOD Root Certificates
Go here http://dodpki.c3pki.chamb.disa.mil/rootca.html
and click on the links to install the root certificates. Check all three boxes and click ?Install?. You may get some error on the first one about not being able to install it because it's not signed. Just keep clicking Yes (about 4 times I think). The other two links shouldn't give you a problem.
Check certificates install in Firefox
Edit > Preferences > Advanced > ?View Certificates?. WARNING! IT MAY ASK YOU FOR YOUR CAC PIN. Don't make the mistake of typing in your Firefox main password (if you use one) or you may lock out your CAC!
You should see a bunch of certificates now under U.S. Government. I would specifically for the three you just installed, but you should see all the common ones you see on a windows machine.
Verify CAC works
Browse to the site you need to login with your CAC and try it out! Or go to https://www.us.army.mil/
and do the CAC login option. It should popup a little window and ask you to pick the certificate. Don't change it, just click OK and you should be logged in. It may or may not ask for your PIN (probably not if you bother to check to see if the certificates were loaded/installed in Firefox per the Check certificate install in Firefox directions in the above paragraph.
ATTACH: Zipped doc file containing above for your printing pleasure!