This repository contains automated Bash scripts to configure Common Access Card (CAC) support on Pop!_OS and Arch Linux systems using OpenSC and the DoD certificate bundle. The scripts are styled with Rosé Pine Moon ANSI colors for consistent terminal aesthetics.
- Installs required middleware:
opensc
,pcscd
,ccid
,nss
, and related tools. - Initializes NSS databases for Firefox and Chrome/Chromium.
- Downloads and imports DoD root and intermediate certificates.
- Adds the OpenSC PKCS#11 module to the browser certificate store.
- Logs key setup steps and errors with color-coded messages.
PopOS_cac_setup.sh
– tailored for Debian-based Pop!_OS systemsArch_cac_setup.sh
– tailored for Arch Linux systems usingpacman
- A CAC reader (e.g., SCM SCR3500)
- Administrative privileges (
sudo
) - Firefox and/or Chrome/Chromium installed
sudo ./PopOS_cac_setup.sh
Arch Linux
bash
Copy
Edit
sudo ./Arch_cac_setup.sh
After running the script:
-
Insert your CAC and open Firefox or Chrome.
-
Navigate to:
- Firefox:
Preferences > Privacy & Security > Security Devices
- Chrome:
Settings > Privacy and Security > Manage Certificates
- Firefox:
-
Confirm that
OpenSC-PKCS11
is listed. -
Test in terminal with:
pkcs11-tool --module /usr/lib/opensc-pkcs11.so --list-objects
This script is provided as-is with no guarantee. Use at your own risk and validate security compliance per your organization's policy.