Use the files here and the steps below to configure a laptop to enable and disable fingerprint auth support in PAM when the lid is opened or closed.
NOTE: Currently not working is setting the correct state when the machine first boots. It is just whatever is last.
- Install
acpid - Enable
acpid
$ sudo apt install --assume-yes acpid
$ sudo systemctl enable --now acpid
- Download the config file and bash script and install them into
/etc/acpid
$ sudo install -D --owner=root --group=root --mode=0644 laptop-lid /etc/acpid/events/laptop-lid
$ sudo install -D --owner=root --group=root --mode=0744 laptop-lid.sh /etc/acpid/laptop-lid.sh
$ sudo systemctl restart acpid
- Open lid and in a new terminal attempt to use sudo:
~ $ sudo bash
Place your finger on the fingerprint reader
- Close lid and in a new terminal attempt to use sudo:
~ $ sudo bash
[sudo] password for user: