Skip to content

Install

McDope edited this page Jun 3, 2026 · 24 revisions

It's recommended to install by using one of the packages, depending on your Distribution. By doing so you get the usual benefits of apt/rpm/pacman and can easily uninstall later.

For Debian you also get a working config out-of-box if you have connected the device you want to use before installing. It will integrate the PAM module into your current PAM setup by utilizing pam-auth-update from libpam-runtime. Though this only allows you to configure a single user. If you want to configure additional users run pamusb-conf --add-user= after installing.

For Fedora and Arch you will have to manually configure pamusb since there is nothing like debconf in rpm, and no autoconfig for Arch yet (see https://github.com/mcdope/pam_usb/discussions/135).

Installing from repository

There is an APT repository with prebuilt amd64 deb packages available. You can find it at https://apt.mcdope.org/. Cross-architecture packages are not provided via the repository; use the nightly builds instead.

Arch users can choose between two different AUR packages — pam_usb (latest release) and pam_usb-git (built from the master branch). Both are also available in the Chaotic-AUR binary repository, so if you have Chaotic-AUR configured you can install without building from source:

pacman -S pam_usb

Fedora users need to build their own RPM. I won't provide a repository since I couldn't properly test it myself because I use only deb based distributions.

Nightly builds

Automatic nightly builds are available at https://github.com/mcdope/pam_usb/releases/tag/nightly.

From v0.9.3 onwards, builds are provided for multiple architectures:

Package amd64 arm64 armhf riscv64 i386 m68k
.deb (Debian/Ubuntu) ✓ ✓ ✓ ✓ ✓ ✓
.rpm (Fedora) ✓ ✓ — — — —
.zst (Arch) ✓ ✓ — — — —

Installing a downloaded package

After downloading a package from the releases page or nightly builds, install it with your package manager so dependencies are handled automatically:

Debian/Ubuntu:

sudo apt install ./libpam-usb_*.deb

Fedora:

sudo dnf install ./pam_usb-*.rpm

Arch:

sudo pacman -U ./pam_usb-*.pkg.tar.zst

Installing from source

Before proceeding, make sure all dependencies are installed:

Requirements for compiling from source (Debian based)


  • libxml2-dev
  • libpam0g-dev
  • libudisks2-dev
  • libglib2.0-dev
  • libevdev-dev
  • pkg-config
  • gir1.2-udisks-2.0
  • python3
  • python3-gi

... for copy 'n paste comfort: sudo apt install libxml2-dev libpam0g-dev libudisks2-dev libglib2.0-dev libevdev-dev pkg-config gir1.2-udisks-2.0 python3 python3-gi

Requirements for compiling from source (Fedora based)


  • libxml2-devel
  • pam-devel
  • libudisks2-devel
  • glib2-devel
  • libevdev-devel
  • python3-gobject

... for copy 'n paste comfort: sudo dnf install libxml2-devel pam-devel libudisks2-devel glib2-devel libevdev-devel python3-gobject

Requirements for compiling from source (Arch based)


  • base-devel (provides gcc, make, pkgconf)
  • libxml2
  • pam
  • udisks2
  • libevdev
  • python
  • python-gobject

... for copy 'n paste comfort: sudo pacman -S base-devel libxml2 pam udisks2 libevdev python python-gobject

Compiling from source


$ make
# sudo make install

When compiling from source you won't get the auto-config of the debian package. See Getting started or Configuration to configure your setup.

Create a package

Packaging is done in Docker containers so you will have to set Docker up first. Also make sure your user is allowed to start containers without root privileges. See other sources for how to do this - it would be too much for this Wiki.

Create .deb


Run make build-debian. Afterwards you will find the created deb package in the .build directory.

This requires only Docker since everything will be done in the container. You could also run make deb to build the package locally, but you will have to work out the dependencies yourself then.

Create .rpm


Run make build-fedora. Afterwards you will find the created rpm package in the .build directory.

This requires only Docker since everything will be done in the container. You could also run make rpm to build the package locally, but you will have to work out the dependencies yourself then.

Create .zst


Run make build-arch. Afterwards you will find the created zst package in the .build directory.

This requires only Docker since everything will be done in the container. You could also run make zst to build the package locally, but you will have to work out the dependencies yourself then.

Create all packages at once


Run make build-all to build .deb, .rpm, and .zst in sequence. All packages will be placed in the .build directory.

Cross-architecture packages (v0.9.3+)


Docker + QEMU user-mode emulation is used to build packages for non-native architectures. Run make setup-qemu first (registers QEMU binfmt handlers), then use the arch-specific targets:

Target Output Architecture
make build-debian-arm64 .deb arm64
make build-debian-armhf .deb armhf
make build-debian-riscv64 .deb riscv64
make build-debian-i386 .deb i386
make build-debian-m68k .deb m68k (cross-compiled via Debian ports)
make build-fedora-arm64 .rpm arm64
make build-arch-arm64 .zst arm64

make build-all includes all of the above. Each target only requires Docker; no host toolchain changes are needed.