如何在 Ubuntu 中添加指纹登录
指纹 登录
![](/data/attachment/album/202104/26/191530msmenm3ges3kgyet.jpg)


现在很多高端笔记本都配备了指纹识别器。Windows 和 macOS 支持指纹登录已经有一段时间了。在桌面 Linux 中，对指纹登录的支持更多需要极客的调整，但 [GNOME](https://www.gnome.org/) 和 [KDE](https://kde.org/) 已经开始通过系统设置来支持它。


这意味着在新的 Linux 发行版上，你可以轻松使用指纹识别。在这里我将在 Ubuntu 中启用指纹登录，但你也可以在其他运行 GNOME 3.38 的发行版上使用这些步骤。



> 
> **前提条件**
> 
> 
> 当然，这是显而易见的。你的电脑必须有一个指纹识别器。
> 
> 
> 这个方法适用于任何运行 GNOME 3.38 或更高版本的 Linux 发行版。如果你不确定，你可以[检查你使用的桌面环境版本](https://itsfoss.com/find-desktop-environment/)。
> 
> 
> KDE 5.21 也有一个指纹管理器。当然，截图看起来会有所不同。
> 
> 
> 


### 在 Ubuntu 和其他 Linux 发行版中添加指纹登录功能


进入 “设置”，然后点击左边栏的 “用户”。你应该可以看到系统中所有的用户账号。你会看到几个选项，包括 “指纹登录”。


点击启用这里的指纹登录选项。


![Enable fingerprint login in Ubuntu](/data/attachment/album/202104/26/191603ykjk2n8g3a2krr34.png)


它将立即要求你扫描一个新的指纹。当你点击 “+” 号来添加指纹时，它会提供一些预定义的选项，这样你就可以很容易地识别出它是哪根手指或拇指。


当然，你可以点击右手食指但扫描左手拇指，不过我看不出你有什么好的理由要这么做。


![Adding fingerprint](/data/attachment/album/202104/26/191604e8zvz8dpbt8ismm8.png)


在添加指纹时，请按照指示旋转你的手指或拇指。


![Rotate your finger](/data/attachment/album/202104/26/191605chp049mp664p6up9.png)


系统登记了整个手指后，就会给你一个绿色的信号，表示已经添加了指纹。


![Fingerprint successfully added](/data/attachment/album/202104/26/191605mmzigg5la4xmsskx.png)


如果你想马上测试一下，在 Ubuntu 中按 `Super+L` 快捷键锁定屏幕，然后使用指纹进行登录。


![Login With Fingerprint in Ubuntu](/data/attachment/album/202104/26/191607qzrr0avvpm7dqg4m.jpg)


#### 在 Ubuntu 上使用指纹登录的经验


指纹登录顾名思义就是使用你的指纹来登录系统。就是这样。当要求对需要 `sudo` 访问的程序进行认证时，你不能使用手指。它不能代替你的密码。


还有一件事。指纹登录可以让你登录，但当系统要求输入 `sudo` 密码时，你不能用手指。Ubuntu 中的 [钥匙环](https://itsfoss.com/ubuntu-keyring/) 也仍然是锁定的。


另一件烦人的事情是因为 GNOME 的 GDM 登录界面。当你登录时，你必须先点击你的账户才能进入密码界面。你在这可以使用手指。如果能省去先点击用户帐户 ID 的麻烦就更好了。


我还注意到，指纹识别没有 Windows 中那么流畅和快速。不过，它可以使用。


如果你对 Linux 上的指纹登录有些失望，你可以禁用它。让我在下一节告诉你步骤。


### 禁用指纹登录


禁用指纹登录和最初启用指纹登录差不多。


进入 “设置→用户”，然后点击指纹登录选项。它会显示一个有添加更多指纹或删除现有指纹的页面。你需要删除现有的指纹。


![Disable Fingerprint Login](/data/attachment/album/202104/26/191609ktkchqmxwwrq76w6.png)


指纹登录确实有一些好处，特别是对于我这种懒人来说。我不用每次锁屏时输入密码，我也对这种有限的使用感到满意。


用 [PAM](https://tldp.org/HOWTO/User-Authentication-HOWTO/x115.html) 启用指纹解锁 `sudo` 应该不是完全不可能。我记得我 [在 Ubuntu 中设置脸部解锁](https://itsfoss.com/face-unlock-ubuntu/)时，也可以用于 `sudo`。看看以后的版本是否会增加这个功能吧。


你有带指纹识别器的笔记本吗？你是否经常使用它，或者它只是你不关心的东西之一？




---


via: <https://itsfoss.com/fingerprint-login-ubuntu/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

Many high-end laptops come with fingerprint readers these days. Windows and macOS have been supporting fingerprint login for some time. In desktop Linux, the support for fingerprint login was more of geeky tweaks but [GNOME](https://www.gnome.org/) and [KDE](https://kde.org/) have started supporting it through system settings.

This means that on newer Linux distribution versions, you can easily use fingerprint reading. I am going to enable fingerprint login in Ubuntu here but you may use the steps on other distributions running GNOME 3.38.

This **method works for any Linux distribution running GNOME version 3.38 or higher**. If you are not certain, you may [check which desktop environment version you are using](https://itsfoss.com/find-desktop-environment/).

KDE 5.21 also has a fingerprint manager. The screenshots will look different, of course.

## Adding fingerprint login in Ubuntu and other Linux distributions

Go to **Settings** and the click on **Users** from left sidebar. You should see all the user account on your system here. You’ll see several option including **Fingerprint Login**.

Click on the Fingerprint Login option here.

![Enable Fingerprint Ubuntu](https://itsfoss.com/content/images/wordpress/2021/02/enable-fingerprint-ubuntu-800x607.png)

It will immediately ask you to scan a new fingerprint. When you click the + sign to add a fingerprint, it presents a few predefined options so that you can easily identify which finger or thumb it is.

You may of course scan left thumb by clicking right index finger though I don’t see a good reason why you would want to do that.

![Adding Fingerprint Login Ubuntu](https://itsfoss.com/content/images/wordpress/2021/02/adding-fingerprint-login-ubuntu.png)

While adding the fingerprint, rotate your finger or thumb as directed.

![Adding Fingerprint Ubuntu Linux](https://itsfoss.com/content/images/wordpress/2021/02/adding-fingerprint-ubuntu-linux-800x603.png)

Once the system registers the entire finger, it will give you a green signal that the fingerprint has been added.

![Fingerprint Added Ubuntu](https://itsfoss.com/content/images/wordpress/2021/02/fingerprint-added-ubuntu.png)

If you want to test it right away, lock the screen by pressing Super+L keyboard shortcut in Ubuntu and then using the fingerprint for login.

![Login With Fingerprint Ubuntu](https://itsfoss.com/content/images/wordpress/2021/02/login-with-fingerprint-ubuntu.jpg)

### Experience with fingerprint login on Ubuntu

Fingerprint login is what its name suggests: login using your fingerprint. That’s it. You cannot use your finger when it asks for authentication for programs that need sudo access. It’s not a replacement of your password.

One more thing. The fingerprint login allows you to log in but you cannot use your finger when your system asks for sudo password. The [keyring in Ubuntu](https://itsfoss.com/ubuntu-keyring/) also remains locked.

Another annoying thing is because of GNOME’s GDM login screen. When you login, you have to click on your account first to get to the password screen. This is where you can use your finger. It would have been nicer to not bothered about clicking the user account ID first.

I also notice that fingerprint reading is not as smooth and quick as it is in Windows. It works, though.

If you are somewhat disappointed with the fingerprint login on Linux, you may disable it. Let me show you the steps in the next section.

## Disable fingerprint login

Disabling fingerprint login is pretty much the same as enabling it in the first place.

Go to **Settings→User** and then click on Fingerprint Login option. It will show a screen with options to add more fingerprints or delete the existing ones. You need to delete the existing fingerprints.

![Disable Fingerprint Login](https://itsfoss.com/content/images/wordpress/2021/02/disable-fingerprint-login.png)

## Troubleshooting: I don't see a fingerprint option

If you are sure that your laptop has a fingerprint reader and yet you don't see the option to enable Fingerprint in user account settings then it's a driver issue.

Please check the manufacturer of the fingerprint reader with this command:

`lsusb`


**Read the output in detail and see if you see something about Fingerprints. Once you know the manufacturer, you can search on the internet and see if your distribution or kernel version supports your fingerprint.**

For example, My Dell XPS came with Shenzhen Goodix fingerprint reader.

![Check fingerprint reader](https://itsfoss.com/content/images/2023/02/fingerprint-check-linux.png)

It worked till Ubuntu 20.04 as you can see above. But the later Ubuntu versions don't support it.

Apparently, there is no newer driver but the old driver still works. If you have the same Shenzhen Goodix fingerprint reader, you can try following the instructions in [this Reddit post](https://www.reddit.com/r/linux4noobs/comments/sp3iky/how_to_enable_fingerprint_login_in_ubuntu_on_dell/).

## Did you figure out the finger?

Fingerprint login does have some benefits, especially for lazy people like me. I don’t have to type my password every time I lock the screen and I am happy with the limited usage.

Enabling sudo with fingerprint should not be entirely impossible with [PAM](https://tldp.org/HOWTO/User-Authentication-HOWTO/x115.html). I remember that when I [set up face unlock in Ubuntu](https://itsfoss.com/face-unlock-ubuntu/), it could be used with sudo as well. Let’s see if future versions add this feature.

Do you have a laptop with fingerprint reader? Do you use it often or is it just one of things you don’t care about?