LinuxCamPAM

Face unlock for Linux sudo, login and lock screens through PAM

A C++ daemon keeps YuNet and SFace ONNX models loaded under OpenCV, with OpenCL acceleration and a CPU fallback, and answers a thin PAM module over a Unix socket. It drives IR emitters, pairs IR with RGB for liveness, reads I2C presence sensors and asks for Enter before sudo.

Trade-offs

  • A resident daemon holds the models in RAM and a thin PAM module asks it over a Unix socket. No interpreter or model load per attempt, but a root service runs all the time.
  • Unix domain sockets over D-Bus, which deadlocks inside PAM under Wayland and early boot. The socket is world-writable, so the daemon only returns success or failure and rate-limits requests.
  • OpenCL is the one accelerator in the default static build, covering Intel, NVIDIA, AMD and ARM GPUs. Native CUDA and OpenVINO stay out to keep the package small.

Q&A3

It depends on the camera. IR with RGB resists photos and screens, which look dark in near-IR, though this is 2D reflection, not 3D depth. A single IR camera is open to IR-reflective printed masks, and a single RGB camera is easily spoofed and not recommended for sudo.

Reviews

Loading reviews

    More in Auth

    See all 9 →
    • OVLTSelf-hosted OIDC server in one Rust binary, multi-tenant through Postgres RLS
    • KotauthMulti-tenant OAuth2 and OIDC identity server in Kotlin, self-hosted in Docker
    • Desktop-2FAOffline TOTP manager for the terminal with an encrypted local vault
    • ZeroLinkAccount-free secret sharing where the receiver locks the link first
    • ProtocolSoupIdentity protocol sandbox with live flows against a real mock IdP
    • vAuthTPM-backed FIDO2 authenticator for Linux, seen by browsers as a security key

    More in Security

    See all 45 →
    • ZeroboxDeny-by-default process sandbox with per-host secret injection
    • PandaWardLocal application security assessment that reports what it couldn't decide
    • SnitchPer-app network monitor and outbound firewall for the desktop
    • ConduitSSH, Mosh and SFTP client for phones with no account and no cloud sync
    • AEGISPre-execution firewall that checks every agent tool call before it runs
    • ClawMoatZero-dependency security layer for AI agents and laptop-hosted agent hosts

    More in Computer vision

    See all 16 →
    • PyVideoProcMulti-stream, multi-GPU video analytics in Python on CUDA and TensorRT
    • SAM3DBody-cppStandalone C++ inference for SAM-3D-Body, with BVH motion capture
    • CorridorKey-RuntimeNative AI keying runtime and OFX plugin for Resolve and Nuke
    • px4-ros2-drone-navROS 2 stack that flies a PX4 drone through dark spaces with no GNSS or map
    • ML ForgeVisual node editor for building and training PyTorch image classifiers
    • LucidaBackground removal model fine-tuned for glass, camouflage, text and print