### Configure PAM Authentication for fprintd Source: https://context7.com/libfprint/fprintd/llms.txt Examples for configuring PAM files to enable fingerprint authentication for sudo and GDM services. It demonstrates the use of pam_fprintd.so with specific options like timeout and max-tries. ```bash # /etc/pam.d/sudo auth sufficient pam_fprintd.so timeout=30 max-tries=3 auth include system-auth # /etc/pam.d/gdm-fingerprint auth required pam_env.so auth required pam_fprintd.so auth optional pam_gnome_keyring.so ``` -------------------------------- ### Bash: pam_fprintd Module Configuration Source: https://context7.com/libfprint/fprintd/llms.txt Configuration examples for the pam_fprintd module in PAM-aware applications. Shows how to integrate fingerprint authentication for login, sudo, and display managers, including options for debugging and timeouts. ```bash # /etc/pam.d/system-auth or /etc/pam.d/common-auth # Add before pam_unix.so for fingerprint-first authentication auth sufficient pam_fprintd.so # With debugging enabled auth sufficient pam_fprintd.so debug # With custom timeout (in seconds) and max retry attempts auth sufficient pam_fprintd.so timeout=20 max-tries=5 ``` -------------------------------- ### Python: Connect to Signals, Claim, Verify, and Manage Device Source: https://context7.com/libfprint/fprintd/llms.txt Python script demonstrating how to connect to fprintd signals, claim a device, check enrolled fingers, start verification, and handle the main loop. Includes error handling for enrollment and cleanup. ```python import sys from gi.repository import GLib # Assuming 'device' is an already initialized fprint device object # For example: # from fprint import FprintDevice # device = FprintDevice() # Placeholder for device object for demonstration class MockDevice: def VerifyStatus_connect(self, callback): print("Connected to VerifyStatus signal") def VerifyFingerSelected_connect(self, callback): print("Connected to VerifyFingerSelected signal") def Claim(self, owner): print(f"Claiming device for: {owner}") def ListEnrolledFingers(self, owner): print(f"Listing enrolled fingers for: {owner}") return ["finger1", "finger2"] def VerifyStart(self, match_mode): print(f"Starting verification with mode: {match_mode}") def Release(self): print("Releasing device") def VerifyStop(self): print("Stopping verification") device = MockDevice() # Replace with actual device initialization def on_verify_status(status): print(f"Verify status: {status}") def on_finger_selected(finger_index): print(f"Finger selected: {finger_index}") # Connect to signals device.VerifyStatus_connect(on_verify_status) device.VerifyFingerSelected_connect(on_finger_selected) # Claim device device.Claim("") # Check enrolled fingers try: enrolled = device.ListEnrolledFingers("") print(f"Enrolled fingers: {enrolled}") except Exception as e: print("No fingerprints enrolled. Please enroll first.") device.Release() sys.exit(1) # Start verification using "any" to match against all enrolled fingers print("Please scan your finger...") device.VerifyStart("any") # Run main loop loop = GLib.MainLoop() try: loop.run() except KeyboardInterrupt: print("\nVerification cancelled") finally: try: device.VerifyStop() except: pass device.Release() ``` -------------------------------- ### List Enrolled Fingers using gdbus Source: https://context7.com/libfprint/fprintd/llms.txt This command-line example uses gdbus to list all enrolled fingerprints for the current user on the default fingerprint device. It connects to the system bus and calls the ListEnrolledFingers method. ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.ListEnrolledFingers "" ``` -------------------------------- ### Enroll Fingerprint using Python (pydbus) Source: https://context7.com/libfprint/fprintd/llms.txt This Python script demonstrates the complete fingerprint enrollment process. It claims the device, starts enrollment for a specified finger, and handles various enrollment status signals. The device is released upon completion or interruption. ```python #!/usr/bin/env python3 """Complete fingerprint enrollment example using D-Bus.""" from pydbus import SystemBus from gi.repository import GLib # Valid finger names FINGER_NAMES = [ 'left-thumb', 'left-index-finger', 'left-middle-finger', 'left-ring-finger', 'left-little-finger', 'right-thumb', 'right-index-finger', 'right-middle-finger', 'right-ring-finger', 'right-little-finger' ] def on_enroll_status(result, done): """Handle enrollment status signals.""" print(f"Enroll status: {result} (done: {done})") if result == 'enroll-stage-passed': print("Stage passed! Please scan your finger again.") elif result == 'enroll-completed': print("Enrollment completed successfully!") loop.quit() elif result == 'enroll-failed': print("Enrollment failed!") loop.quit() elif result == 'enroll-retry-scan': print("Please retry scanning your finger.") elif result == 'enroll-swipe-too-short': print("Swipe was too short. Please try again.") elif result == 'enroll-finger-not-centered': print("Finger not centered. Please try again.") elif result == 'enroll-remove-and-retry': print("Remove your finger and try again.") elif result == 'enroll-data-full': print("Device storage is full. Delete some prints first.") loop.quit() elif result == 'enroll-duplicate': print("This fingerprint is already enrolled.") loop.quit() bus = SystemBus() manager = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager') # Get default device device_path = manager.GetDefaultDevice() device = bus.get('net.reactivated.Fprint', device_path) # Connect to EnrollStatus signal device.EnrollStatus.connect(on_enroll_status) # Claim device for current user device.Claim("") # Get number of enrollment stages num_stages = device.Get('net.reactivated.Fprint.Device', 'num-enroll-stages') print(f"Enrollment requires {num_stages} stages") # Start enrollment for right index finger finger = 'right-index-finger' print(f"Starting enrollment for {finger}...") print("Please scan your finger on the reader.") device.EnrollStart(finger) # Run main loop to receive signals loop = GLib.MainLoop() try: loop.run() except KeyboardInterrupt: print("\nEnrollment cancelled") finally: # Always stop enrollment and release device try: device.EnrollStop() except: pass device.Release() ``` -------------------------------- ### Get Default Fingerprint Device using D-Bus and Python Source: https://context7.com/libfprint/fprintd/llms.txt This snippet demonstrates how to retrieve the default fingerprint reader's D-Bus object path. It includes examples using `gdbus` and the Python `pydbus` library for system bus interaction. ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Manager \ --method net.reactivated.Fprint.Manager.GetDefaultDevice ``` ```python from pydbus import SystemBus bus = SystemBus() manager = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager') device_path = manager.GetDefaultDevice() print(f"Default device: {device_path}") devices = manager.GetDevices() print(f"Found {len(devices)} device(s): {devices}") ``` -------------------------------- ### Enrollment API Source: https://context7.com/libfprint/fprintd/llms.txt Provides methods to start and stop the fingerprint enrollment process for a specific finger. This requires the device to be claimed first. ```APIDOC ## Fingerprint Enrollment API ### Description Starts and stops fingerprint enrollment for a specific finger. The device must be claimed before enrollment can begin. ### Method D-Bus Calls ### Endpoint `net.reactivated.Fprint.Device.EnrollStart` and `net.reactivated.Fprint.Device.EnrollStop` ### Parameters #### Path Parameters - **None** #### Query Parameters - **None** #### Request Body - **finger** (string) - Required - The name of the finger to enroll (e.g., 'right-index-finger'). ### Request Example (Python) ```python #!/usr/bin/env python3 from pydbus import SystemBus from gi.repository import GLib # Valid finger names FINGER_NAMES = [ 'left-thumb', 'left-index-finger', 'left-middle-finger', 'left-ring-finger', 'left-little-finger', 'right-thumb', 'right-index-finger', 'right-middle-finger', 'right-ring-finger', 'right-little-finger' ] def on_enroll_status(result, done): print(f"Enroll status: {result} (done: {done})") if result == 'enroll-completed': print("Enrollment completed successfully!") loop.quit() elif result == 'enroll-failed': print("Enrollment failed!") loop.quit() # ... other status handlers ... bus = SystemBus() manager = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager') device_path = manager.GetDefaultDevice() device = bus.get('net.reactivated.Fprint', device_path) device.EnrollStatus.connect(on_enroll_status) device.Claim("") finger = 'right-index-finger' print(f"Starting enrollment for {finger}...") device.EnrollStart(finger) loop = GLib.MainLoop() loop.run() # Always stop enrollment and release device try: device.EnrollStop() except: pass device.Release() ``` ### Response #### Success Response (200) - **Enrollment Status Signal** - Signals are emitted during the enrollment process indicating the current stage and status (e.g., 'enroll-stage-passed', 'enroll-completed'). #### Response Example ``` Enrollment requires 5 stages Starting enrollment for right-index-finger... Please scan your finger on the reader. Enroll status: enroll-stage-passed (done: False) Stage passed! Please scan your finger again. Enroll status: enroll-completed (done: True) Enrollment completed successfully! ``` ``` -------------------------------- ### Verify Fingerprint using Python (pydbus) Source: https://context7.com/libfprint/fprintd/llms.txt This Python script demonstrates fingerprint verification. It connects to the system bus, gets the default device, and sets up handlers for verification status signals. It can verify against all enrolled fingers by using 'any'. ```python #!/usr/bin/env python3 """Complete fingerprint verification example using D-Bus.""" from pydbus import SystemBus from gi.repository import GLib def on_verify_status(result, done): """Handle verification status signals.""" print(f"Verify status: {result} (done: {done})") if result == 'verify-match': print("Fingerprint matched! Authentication successful.") loop.quit() elif result == 'verify-no-match': print("Fingerprint did not match.") loop.quit() elif result == 'verify-retry-scan': print("Please retry scanning your finger.") elif result == 'verify-swipe-too-short': print("Swipe was too short. Please try again.") elif result == 'verify-finger-not-centered': print("Finger not centered. Please try again.") elif result == 'verify-remove-and-retry': print("Remove your finger and try again.") elif result == 'verify-disconnected': print("Device disconnected!") loop.quit() elif result == 'verify-unknown-error': print("Unknown error occurred.") loop.quit() def on_finger_selected(finger_name): """Handle finger selection signal.""" print(f"Verifying against: {finger_name}") bus = SystemBus() manager = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager') # Get default device device_path = manager.GetDefaultDevice() device = bus.get('net.reactivated.Fprint', device_path) # Connect to VerifyStatus signal device.VerifyStatus.connect(on_verify_status) # Claim device for current user device.Claim("") # Start verification against all enrolled fingers print("Starting verification...") print("Please scan your finger on the reader.") device.VerifyStart("any") # Run main loop to receive signals loop = GLib.MainLoop() try: loop.run() except KeyboardInterrupt: print("\nVerification cancelled") finally: # Always stop verification and release device try: device.VerifyStop() except: pass device.Release() ``` -------------------------------- ### Verification API Source: https://context7.com/libfprint/fprintd/llms.txt Provides methods to start and stop the fingerprint verification process against stored prints. 'any' can be used to match against all enrolled fingers. ```APIDOC ## Fingerprint Verification API ### Description Starts and stops fingerprint verification against stored prints. The verification can be against a specific finger or against all enrolled fingers. ### Method D-Bus Calls ### Endpoint `net.reactivated.Fprint.Device.VerifyStart` and `net.reactivated.Fprint.Device.VerifyStop` ### Parameters #### Path Parameters - **None** #### Query Parameters - **None** #### Request Body - **finger** (string) - Required - The name of the finger to verify against (e.g., 'right-index-finger' or 'any'). ### Request Example (Python) ```python #!/usr/bin/env python3 from pydbus import SystemBus from gi.repository import GLib def on_verify_status(result, done): print(f"Verify status: {result} (done: {done})") if result == 'verify-match': print("Fingerprint matched! Authentication successful.") loop.quit() elif result == 'verify-no-match': print("Fingerprint did not match.") loop.quit() # ... other status handlers ... def on_finger_selected(finger_name): print(f"Verifying against: {finger_name}") bus = SystemBus() manager = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager') device_path = manager.GetDefaultDevice() device = bus.get('net.reactivated.Fprint', device_path) # Assuming verification against any enrolled finger print("Starting verification...") device.VerifyStart('any') # Connect to signals (example, actual signal connection might differ) device.VerifyStatus.connect(on_verify_status) device.FingerSelected.connect(on_finger_selected) loop = GLib.MainLoop() loop.run() # Stop verification if it's still running try: device.VerifyStop() except: pass ``` ### Response #### Success Response (200) - **Verification Status Signal** - Signals are emitted during the verification process indicating the status (e.g., 'verify-match', 'verify-no-match'). #### Response Example ``` Starting verification... Verifying against: right-index-finger Verify status: verify-match (done: True) Fingerprint matched! Authentication successful. ``` ``` -------------------------------- ### Manage fprintd Service and Configuration Source: https://context7.com/libfprint/fprintd/llms.txt Commands to manage the fprintd systemd service and configuration file settings. Includes status checks, logging, and service enablement. ```bash systemctl status fprintd.service journalctl -u fprintd.service systemctl restart fprintd.service ``` ```ini [storage] type=file ``` -------------------------------- ### Claim and Release Fingerprint Device using D-Bus Source: https://context7.com/libfprint/fprintd/llms.txt This snippet shows the D-Bus methods for claiming and releasing a fingerprint device. Claiming is necessary before enrollment or verification, and only one client can hold the claim at a time. It demonstrates claiming for the current user or a specific user. ```bash # Claim device for current user (empty string = calling user) gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Claim "" # Claim device for specific user (requires setusername permission) gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Claim "johndoe" # Release the device when done gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Release ``` -------------------------------- ### Bash: fprintd-enroll Command-Line Utility Source: https://context7.com/libfprint/fprintd/llms.txt Command-line utility to enroll fingerprints for a specified user. Supports enrolling default or specific fingers, and can enroll for other users with root privileges. ```bash # Enroll right index finger for current user fprintd-enroll # Enroll a specific finger fprintd-enroll -f left-thumb # Enroll fingerprint for another user (requires root) sudo fprintd-enroll -f right-index-finger johndoe # Example output: # Using device /net/reactivated/Fprint/Device/0 # Enrolling right-index-finger finger. # Enroll result: enroll-stage-passed # Enroll result: enroll-stage-passed # Enroll result: enroll-stage-passed # Enroll result: enroll-stage-passed # Enroll result: enroll-completed ``` -------------------------------- ### Bash: fprintd-list Command-Line Utility Source: https://context7.com/libfprint/fprintd/llms.txt Command-line utility to list all enrolled fingerprints for specified users across all available devices. Supports listing for single or multiple users. ```bash # List fingerprints for one user fprintd-list johndoe # List fingerprints for multiple users fprintd-list johndoe janedoe admin # Example output: # found 1 devices # Device at /net/reactivated/Fprint/Device/0 # Using device /net/reactivated/Fprint/Device/0 # Fingerprints for user johndoe on Synaptics Sensors (press): # - #0: right-index-finger # - #1: left-thumb ``` -------------------------------- ### Enumerate Fingerprint Devices using D-Bus Source: https://context7.com/libfprint/fprintd/llms.txt This snippet shows how to list all available fingerprint readers connected to the system using the fprintd D-Bus API. It demonstrates usage with both `dbus-send` and `gdbus` command-line tools. ```bash dbus-send --system --dest=net.reactivated.Fprint \ --type=method_call --print-reply \ /net/reactivated/Fprint/Manager \ net.reactivated.Fprint.Manager.GetDevices gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Manager \ --method net.reactivated.Fprint.Manager.GetDevices ``` -------------------------------- ### Access Fingerprint Device Properties via D-Bus Source: https://context7.com/libfprint/fprintd/llms.txt This snippet illustrates how to query properties of a specific fingerprint device, such as its name, scan type (press/swipe), and the number of enrollment stages required. It uses `gdbus` to interact with the device's properties interface. ```bash # Get device name gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method org.freedesktop.DBus.Properties.Get \ net.reactivated.Fprint.Device name # Get scan type (press or swipe) gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method org.freedesktop.DBus.Properties.Get \ net.reactivated.Fprint.Device scan-type # Get number of enrollment stages (only valid when device is claimed) gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method org.freedesktop.DBus.Properties.Get \ net.reactivated.Fprint.Device num-enroll-stages ``` -------------------------------- ### Bash: fprintd-verify Command-Line Utility Source: https://context7.com/libfprint/fprintd/llms.txt Command-line utility to verify a fingerprint against stored prints for a specified user. Can verify a specific finger and supports verification for other users with root privileges. ```bash # Verify fingerprint for current user fprintd-verify # Verify a specific finger fprintd-verify -f right-index-finger # Verify another user's fingerprint (requires root) sudo fprintd-verify johndoe # Example output: # Using device /net/reactivated/Fprint/Device/0 # Listing enrolled fingers: # - #0: right-index-finger # Verifying: right-index-finger # Verify started! # Verify result: verify-match (done) ``` -------------------------------- ### Device Interface: net.reactivated.Fprint.Device Source: https://context7.com/libfprint/fprintd/llms.txt Provides methods for claiming devices, enrolling fingerprints, and verifying identities. ```APIDOC ## Device Interface: net.reactivated.Fprint.Device ### Description Provides methods for claiming devices, enrolling fingerprints, and verifying identities. ### Properties #### Device Properties ##### Description Access device properties to understand its capabilities before performing operations. ##### Endpoint `/net/reactivated/Fprint/Device/{device_path}` (e.g., `/net/reactivated/Fprint/Device/0`) ##### Method `org.freedesktop.DBus.Properties.Get` ##### Parameters - **interface_name** (string) - Required - The interface name (e.g., `net.reactivated.Fprint.Device`). - **property_name** (string) - Required - The name of the property to retrieve (e.g., `name`, `scan-type`, `num-enroll-stages`). ##### Request Example (Get Device Name) ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method org.freedesktop.DBus.Properties.Get \ net.reactivated.Fprint.Device name ``` ##### Response Example (Device Name) ``` (<'Synaptics Sensors'>,) ``` ##### Request Example (Get Scan Type) ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method org.freedesktop.DBus.Properties.Get \ net.reactivated.Fprint.Device scan-type ``` ##### Response Example (Scan Type) ``` (<'press'>,) ``` ##### Request Example (Get Number of Enrollment Stages) ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method org.freedesktop.DBus.Properties.Get \ net.reactivated.Fprint.Device num-enroll-stages ``` ##### Response Example (Number of Enrollment Stages) ``` (<5>,) ``` ### Methods #### Claim and Release ##### Description Before performing enrollment or verification, the device must be claimed by a user. Only one client can claim a device at a time. ##### Endpoint `/net/reactivated/Fprint/Device/{device_path}` (e.g., `/net/reactivated/Fprint/Device/0`) ##### Methods - `net.reactivated.Fprint.Device.Claim` - `net.reactivated.Fprint.Device.Release` ##### Parameters for Claim - **username** (string) - Required - The username to claim the device for. An empty string claims for the calling user. ##### Request Example (Claim for current user) ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Claim "" ``` ##### Request Example (Claim for specific user 'johndoe') ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Claim "johndoe" ``` ##### Request Example (Release device) ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Release ``` #### ListEnrolledFingers ##### Description Lists all enrolled fingerprints for a specified user. Returns an array of finger names. ##### Endpoint `/net/reactivated/Fprint/Device/{device_path}` (e.g., `/net/reactivated/Fprint/Device/0`) ##### Method `net.reactivated.Fprint.Device.ListEnrolledFingers` ##### Parameters - **username** (string) - Required - The username for whom to list enrolled fingers. ##### Request Example ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.ListEnrolledFingers \ "johndoe" ``` ##### Response Example ``` (['left-index-finger', 'right-thumb'],) ``` ``` -------------------------------- ### Manager Interface: net.reactivated.Fprint.Manager Source: https://context7.com/libfprint/fprintd/llms.txt Provides methods to discover and access fingerprint reader devices connected to the system. ```APIDOC ## Manager Interface: net.reactivated.Fprint.Manager ### Description Provides methods to discover and access fingerprint reader devices connected to the system. ### Methods #### GetDevices ##### Description Enumerates all fingerprint readers attached to the system. Returns an array of D-Bus object paths for available devices, or an empty array if no devices are found. ##### Endpoint `/net/reactivated/Fprint/Manager` ##### Method `net.reactivated.Fprint.Manager.GetDevices` ##### Parameters None ##### Request Example ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Manager \ --method net.reactivated.Fprint.Manager.GetDevices ``` ##### Response Example ``` ([objectpath '/net/reactivated/Fprint/Device/0'],) ``` #### GetDefaultDevice ##### Description Returns the default fingerprint reader device object path. Throws `net.reactivated.Fprint.Error.NoSuchDevice` if no fingerprint device is available. ##### Endpoint `/net/reactivated/Fprint/Manager` ##### Method `net.reactivated.Fprint.Manager.GetDefaultDevice` ##### Parameters None ##### Request Example ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Manager \ --method net.reactivated.Fprint.Manager.GetDefaultDevice ``` ##### Response Example ``` (objectpath '/net/reactivated/Fprint/Device/0') ``` ``` -------------------------------- ### List Enrolled Fingers using Python (pydbus) Source: https://context7.com/libfprint/fprintd/llms.txt This Python script uses the pydbus library to connect to the system bus and list enrolled fingerprints. It handles potential 'NoEnrolledPrints' exceptions. ```python from pydbus import SystemBus bus = SystemBus() device = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Device/0') try: fingers = device.ListEnrolledFingers("") print(f"Enrolled fingers: {fingers}") # Output: Enrolled fingers: ['right-index-finger', 'left-thumb'] except Exception as e: if "NoEnrolledPrints" in str(e): print("No fingerprints enrolled for this user") else: raise ``` -------------------------------- ### Define PolicyKit Rules for fprintd Source: https://context7.com/libfprint/fprintd/llms.txt XML and JavaScript configurations for managing fprintd permissions. This includes defining access control for verification and enrollment, and custom rules for group-based access. ```xml Verify fingerprints ``` ```javascript // /etc/polkit-1/rules.d/50-fprintd.rules polkit.addRule(function(action, subject) { if (action.id == "net.reactivated.fprint.device.setusername" && subject.isInGroup("wheel")) { return polkit.Result.YES; } }); ``` -------------------------------- ### List Enrolled Fingers Source: https://context7.com/libfprint/fprintd/llms.txt Lists all the fingerprints that have been enrolled for the current user on the default fingerprint device. ```APIDOC ## List Enrolled Fingers ### Description Retrieves a list of all enrolled fingerprint names for the current user. ### Method GDBus Call ### Endpoint `net.reactivated.Fprint.Device.ListEnrolledFingers` ### Parameters #### Query Parameters - **None** #### Request Body - **None** ### Request Example ```bash gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.ListEnrolledFingers "" ``` ### Response #### Success Response (200) - **Tuple** (list of strings) - A tuple containing a list of enrolled finger names. #### Response Example ```json { "result": ["right-index-finger", "left-thumb"] } ``` ``` ```python ```python from pydbus import SystemBus bus = SystemBus() device = bus.get('net.reactivated.Fprint', '/net/reactivated/Fprint/Device/0') try: fingers = device.ListEnrolledFingers("") print(f"Enrolled fingers: {fingers}") except Exception as e: if "NoEnrolledPrints" in str(e): print("No fingerprints enrolled for this user") else: raise ``` ``` -------------------------------- ### Reference fprintd API Constants Source: https://context7.com/libfprint/fprintd/llms.txt Python-based reference for valid finger names used in the D-Bus API and a mapping of D-Bus error codes to their human-readable meanings. ```python FINGER_NAMES = ['left-thumb', 'left-index-finger', 'right-thumb', 'any'] FPRINTD_ERRORS = { 'net.reactivated.Fprint.Error.ClaimDevice': 'Device was not claimed', 'net.reactivated.Fprint.Error.PermissionDenied': 'PolicyKit denied action' } ``` -------------------------------- ### Bash: Delete All or Specific Enrolled Fingerprints Source: https://context7.com/libfprint/fprintd/llms.txt Command-line interface commands using gdbus to delete all enrolled fingerprints or a specific finger for the user who has claimed the device. Demonstrates both legacy and recommended methods. ```bash # Delete all fingerprints for the current user (legacy method, deprecated) gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.DeleteEnrolledFingers "" # Recommended: Claim device first, then use DeleteEnrolledFingers2 gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Claim "" gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.DeleteEnrolledFingers2 gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Release # Delete a specific finger (requires claimed device) gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Claim "" gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.DeleteEnrolledFinger "right-index-finger" gdbus call --system \ --dest net.reactivated.Fprint \ --object-path /net/reactivated/Fprint/Device/0 \ --method net.reactivated.Fprint.Device.Release ``` -------------------------------- ### Bash: fprintd-delete Command-Line Utility Source: https://context7.com/libfprint/fprintd/llms.txt Command-line utility to delete enrolled fingerprints for specified users. Supports deleting all fingerprints for a user, a specific finger, or for multiple users. ```bash # Delete all fingerprints for a user fprintd-delete johndoe # Delete a specific finger for a user fprintd-delete johndoe -f right-index-finger # Delete fingerprints for multiple users fprintd-delete johndoe janedoe # Example output: # found 1 devices # Device at /net/reactivated/Fprint/Device/0 # Using device /net/reactivated/Fprint/Device/0 # Fingerprints of user johndoe deleted on Synaptics Sensors ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.