Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
IT NachrichtenWhy Wi-Fi extenders simply aren't worth buying in 2026(29.09.2026 um 14:45 Uhr)
•
IT NachrichtenLola is Booking.com's new AI travel agent(29.09.2026 um 15:00 Uhr)
••
Windows Tipps & SecurityThe midrange Dell XPS 13 is the one you actually want(29.09.2026 um 15:00 Uhr)
•
IT NachrichtenInstagram expands what partner schools can do on its app(29.09.2026 um 15:00 Uhr)
•
IT NachrichtenFireflies adds dictation to its desktop notetaking apps(29.09.2026 um 15:00 Uhr)
••
IT NachrichtenMassiver Telefonterror durch 015792651502 und 015792651503(29.09.2026 um 14:40 Uhr)
•••
IT NachrichtenWhy Wi-Fi extenders simply aren't worth buying in 2026(29.09.2026 um 14:45 Uhr)
•
IT NachrichtenLola is Booking.com's new AI travel agent(29.09.2026 um 15:00 Uhr)
••
Windows Tipps & SecurityThe midrange Dell XPS 13 is the one you actually want(29.09.2026 um 15:00 Uhr)
•
IT NachrichtenInstagram expands what partner schools can do on its app(29.09.2026 um 15:00 Uhr)
•
IT NachrichtenFireflies adds dictation to its desktop notetaking apps(29.09.2026 um 15:00 Uhr)
••
IT NachrichtenMassiver Telefonterror durch 015792651502 und 015792651503(29.09.2026 um 14:40 Uhr)
••
Intelligence View
⚡ tsecurity.de Intelligence

Building a Face Authentication System for Linux (Using PAM, systemd, and ONNX)

Linux still lacks a reliable, native biometric authentication system. While platforms like Windows and macOS have tightly integrated face authentication, Linux users typically rely on passwords — or experimental tools that often break u…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Linux still lacks a reliable, native biometric authentication system.



While platforms like Windows and macOS have tightly integrated face authentication, Linux users typically rely on passwords — or experimental tools that often break under real-world conditions.



I wanted something:




  • fully offline

  • predictable under PAM

  • extensible and debuggable



So I built AstraLock.









GitHub logo

shekh-2810
/
AstraLock



AstraLock is a lightweight face-authentication system designed for Linux. It replaces legacy camera pipelines with modern deep-learning models, optimized preprocessing, and a clean, modular architecture. The goal is simple: reliable face-based login on Linux without the sluggishness, low-light failures, or angle sensitivity seen in older tools.







AstraLock



AstraLock is a Linux biometric authentication system that enables face-based login through PAM and systemd, designed to be offline, auditable, and hackable, offering a native Linux alternative to projects like Howdy and closed platforms such as Windows Hello without cloud dependencies.


It runs a local daemon that performs facial verification and integrates directly with system authentication flows such as sudo, login, display managers, and polkit.


AstraLock banner



What AstraLock Is





  • A system daemon that performs face verification




  • A PAM module (pam_facelock.so) for system authentication




  • A CLI tool for enrollment, verification, and testing




  • A local-only LBPH model (no cloud, no network)




No external services.
No telemetry.
No vendor lock-in.



Features




  • 🔐PAM authentication (login, sudo, polkit, display managers)

  • 🧠Offline facial recognition (LBPH, OpenCV)

  • ⚙️systemd-managed daemon lifecycle

  • 📷 Webcam support via OpenCV

  • 🧪Built-in testing via pamtester

  • Simple CLI for users and admins




Architecture

…











The Problem with Existing Approaches



Most existing solutions (like Howdy) work — until they don’t.



Common issues:




  • PAM inconsistencies across sudo, login, and display managers

  • unreliable camera handling

  • fragile integration with system components

  • limited control over the authentication pipeline



The biggest issue wasn’t the ML part — it was system integration.









Design Goals



Before writing code, I defined strict constraints:




  • No cloud dependencies

  • No telemetry

  • Deterministic PAM behavior

  • Clean separation between authentication logic and ML

  • Works across CLI and GUI authentication flows









High-Level Architecture



Instead of embedding everything inside PAM, I separated concerns:




Application (sudo / login / GUI)
↓
PAM
↓
pam_facelock.so
↓
facelockd (systemd service)
↓
UNIX socket IPC
↓
Face recognition pipeline









Why this design?



PAM modules should stay minimal and predictable.



Heavy operations like:




  • camera access

  • model inference

  • image processing



are handled by a separate daemon.



This avoids blocking PAM and improves reliability.









Recognition Pipeline



The pipeline uses modern ONNX-based models:




  1. Face detection (RetinaFace)

  2. Face alignment (landmark-based)

  3. Embedding generation (ArcFace, 512-dim)

  4. Cosine similarity for matching



Everything runs locally.



No external APIs. No network calls.









Key Challenges






1. PAM Behavior is Subtle



The biggest issue was handling:





  • auth sufficient vs required

  • fallback to password authentication

  • inconsistent behavior across services



Small changes in PAM configuration can completely change outcomes.









2. Display Managers Are Inconsistent



GDM, SDDM, and others:




  • handle authentication differently

  • sometimes retry unexpectedly

  • may break assumptions about flow



This required testing across environments.









3. Camera Reliability



Accessing /dev/video* sounds simple — but:




  • permissions vary

  • devices differ

  • latency can affect authentication timing









4. Avoiding Lockouts



Biometric authentication is probabilistic.



So:




  • password fallback is always preserved

  • PAM is configured as sufficient, not exclusive









Current Capabilities




  • Works with sudo, login, and GUI prompts (polkit)

  • Fully offline inference

  • Local model storage per user

  • systemd-managed daemon

  • CLI for enrollment and verification









Security Considerations



This is not meant to replace passwords entirely.



Important points:




  • biometric matching is probabilistic

  • spoofing is a real concern

  • fallback authentication is required



The system is designed for:




convenience + controlled risk, not absolute security










What I Learned




  • System integration is harder than ML

  • PAM is powerful but unforgiving

  • Reliability matters more than accuracy

  • Simplicity in design reduces failure cases









Looking for Feedback



I’m particularly interested in input on:




  • PAM edge cases in real-world deployments

  • failure modes I might be missing

  • biometric authentication tradeoffs on Linux

  • ways to improve reliability without sacrificing usability









Project



AstraLock is open source and still evolving.



If you’ve worked with PAM, Linux auth, or system-level tooling, I’d appreciate your perspective.

2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building a Face Authentication System for Linux (Using PAM, systemd, and ONNX)

Thematisch verwandte Begriffe: Building, Face, Authentication, System · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-102422 | shell-quote's `quote()` function emits a `{ comment }` token as `#` fol…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag