如何在 Ubuntu 20.04/Linux Mint 20 下使用联想 Thinkpad T470s 指纹读取器(有效期 138a:0097)

如何在 Ubuntu 20.04/Linux Mint 20 下使用联想 Thinkpad T470s 指纹读取器(有效期 138a:0097)

我有一台 ThinkPad T470s,和每个 ThinkPad 用户一样,在基于 Ubuntu 20.04 的发行版中我没有开箱即用的内置指纹读取器(我正在运行 Linux Mint 20 MATE,但有原始 Ubuntu 20.04 可供测试)。

lsusb 显示

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 17ef:1010 Lenovo Lenovo ThinkPad Dock   
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. USB3.0-CRW
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 138a:0097 Validity Sensors, Inc. 
Bus 001 Device 004: ID 04f2:b5ab Chicony Electronics Co., Ltd Integrated Camera
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 018: ID 1199:9079 Sierra Wireless, Inc. Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-A
Bus 001 Device 017: ID 062a:4101 MosArt Semiconductor Corp. Wireless Keyboard/Mouse
Bus 001 Device 016: ID 17ef:100f Lenovo Lenovo ThinkPad Dock   
Bus 001 Device 015: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 013: ID 17ef:1010 Lenovo Lenovo ThinkPad Dock   
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

已检测到设备,但无论是在 Ubuntu 的用户管理器中还是在 MATE 的默认管理器中,我都没有基于指纹的身份验证的选项。

我应该怎么办?

答案1

因此,经过大量谷歌搜索并尝试不同的选项后,我找到了一个适合我的解决方案。

首先,我使用的是 Windows 双启动,指纹就是在 Windows 上注册的。这很有帮助,因为我之前无法仅使用 Linux 成功注册指纹。

我只是按照https://github.com/uunicorn/python-validity/tree/master

在 Ubuntu 系统上:

sudo apt remove fprintd
sudo add-apt-repository ppa:uunicorn/open-fprintd
sudo apt-get update
sudo apt install open-fprintd fprintd-clients python3-validity

在执行 README 建议的最后一步之前,fprintd-enroll我必须重新启动,因为出于某种原因,服务拒绝启动。但是,如果您有 Windows 双启动,我建议重新启动到 Windows。

在 Windows 上在命令行中运行:

wmic useraccount get name,sid

将输出保存到您可以从 Linux 访问的地方,然后重新启动 Linux。

编辑/etc/python-validity/dbus-service.yaml示例注释,将其替换为您为其设置指纹认证的用户的 Linux 用户名和 Windows sid。我的文件现在如下所示:

# Mapping for users
# Add mappings from a user to a SID to use the same fingerprints as enrolled by
# Windows. By default, mappings will be generated from the numerical UID if not
# found here. This is fine if you are not dual booting and want to share
# mappings with Windows.
user_to_sid:
    # Example:
    "aivanov": "S-1-5-21-1821111111-1208666666-1382777777-1001"

然后,pam-auth-update以 root 身份运行。确保已选中“指纹认证”配置文件,然后按 OK 保存配置。

现在,重启后指纹验证就立即生效了。您会看到指纹扫描仪灯亮起,如果扫描成功,您可以立即登录,或者必须按 Enter 才能登录(取决于登录 shell)。

fprintd-list还显示所有 Windows 指纹:

$ fprintd-list aivanov
found 1 devices
Device at /net/reactivated/Fprint/Device/0
Using device /net/reactivated/Fprint/Device/0
Fingerprints for user aivanov on DBus driver (press):
 - #0: WINBIO_FINGER_UNSPECIFIED_POS_01
 - #1: WINBIO_FINGER_UNSPECIFIED_POS_02
 - #2: WINBIO_FINGER_UNSPECIFIED_POS_03

所以一切正常。

现在,我无法通过 成功注册我的指纹fprintd-enroll。每当我这样做时,fprintd-verify都无法匹配任何已注册的指纹。由于许多消息来源声称,138a:0097用于 ThinkPad 的各种 Validity 指纹传感器在非 Windows 下注册时行为异常,因此,在这种情况下,我只会使用 VirtualBox 和 Windows 10 来注册我的指纹,并在接下来的 10 年内忘记这件事。如果有人有不需要 Windows 的有效解决方案,请分享。

相关内容