5

I am currently running Manjaro Linux on a Lenovo ThinkPad L530. This machine has an integrated UPEK Fingerprint-Reader, with USB-ID 147e:1002. Now what I am trying to do is to set up the fingerprint-gui package from AUR with that fingerprint reader, but it does not recognize the device. It shows up in the 'Attached USB Devices' List though. When I run the fingerprint-gui command as root (or with sudo) however, it properly recognizes the reader and is able to use it without any problems whatsoever.

Is there any possibility I can use the fingerprint reader without logging in as root?

rocket_doge_
  • 201
  • 2
  • 6
  • I have no experience with this, but this sounds like permission problems. To debug this I would first find the file(s) in /dev that the fingerprint-gui was using. If the GUI hangs around I would run it as root, run pgrep in another terminal to find the process id then run `ls -n /proc/PID/fd`. This should show you the files it has open. If you are lucky this will point to something that is only readable by root. Change the permission to allow everyone, and try the GUI again. If it works then it is probably a matter of finding a udev rule that creates the device and changing the permissions. – icarus May 17 '17 at 00:53

2 Answers2

5

Turns out I needed a new udev rule. I followed this tutorial with a slight modification:

  • Make /lib/udev/rules.d/40-libfprint0-custom.rules as follows:

    ATTRS{idVendor}=="147e", ATTRS{idProduct}=="1002", MODE="0664", GROUP="plugdev"
    
  • Add yourself to the plugdev group:

    # usermod -a -G plugdev username
    
  • Restart udev:

    # service udev restart
    
  • Log out/back in to get the new plugdev group membership.

  • Use fingerprint-gui to do the enrollment.
Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
rocket_doge_
  • 201
  • 2
  • 6
  • Isn't it better to use `MODE="0660"` is it wouldn't allow non-authorised users to read on the device? And to use the device you need to be able to write to it to activate it. So having just read access is pointless anyway. – Itay Grudev Mar 30 '18 at 11:55
  • This! I'm running Manjaro and it did allow me to setup the fingerprints however a new problem appeared which is how to enable fingerprint-gui work with su, gksu etc. – Mr. Raspberry Apr 18 '18 at 19:36
  • And it was fixed by modification of /etc/pam.d/{su, sudo} files https://wiki.archlinux.org/index.php/Fingerprint-gui – Mr. Raspberry Apr 18 '18 at 19:51
  • Note that there are distributions where the `plugdev` group does not exist. The OP uses Manjaro and your answer is based on a tutorial for Ubuntu. – Jakub Klinkovský Oct 11 '20 at 18:47
0

(Perhaps the above is better, I haven't tried it)

What I did worked for me, replace AuthenTec as fits yours (from lsusb)

sudo vi /usr/local/sbin/finger.local

#!/bin/bash 
# /usr/local/sbin/finger.local 
BUS='chmod 777 /dev/bus/usb/'
BUS+=`lsusb | grep AuthenTec | awk '{print $2}'`
BUS+='/'
BUS+=`lsusb | grep AuthenTec | awk '{print $4}'`
BUS=${BUS%?};
$BUS

sudo vi /etc/systemd/system/finger-local.service

[Unit]
Description=enable permissions for fingerprint-gui on boot
ConditionFileIsExecutable=/usr/local/sbin/finger.local

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/finger.local
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

sudo chmod +x /usr/local/sbin/finger.local

sudo systemctl enable finger-local.service reboot