最近,我成功地在我的笔记本电脑上实现了指纹认证,这要感谢Goodix Linux Development Discord 社区以及https://github.com/infinytum/libfprint/tree/driver/538ddriver/538d
分支上的 github 用户 Infinytum 和 Michael Teuscher 。
但在启用指纹登录fprintd-enroll
和sudo
访问后sudo pam-auth-update
,我注意到一个问题:
每当我使用外接显示器工作时,盖子关闭时,我必须等待指纹验证超时才能输入密码sudo
,这会导致几秒钟的延迟:
username@host:~/ron/libfprint$ sudo ls
Place your finger on the fingerprint reader
Place your finger on the reader again
Place your finger on the reader again
Place your finger on the reader again
Verification timed out
[sudo] password for username:
Run Code Online (Sandbox Code Playgroud)
如何在笔记本电脑盖关闭时禁用指纹验证,以便我sudo
无需等待指纹超时即可输入密码?
每当我使用指纹传感器而不是登录密码登录时,都会显示一个弹出窗口,要求gnome-keyring
输入登录密码,以解锁存储在那里的各种证书。
这很烦人,因为它会抢走焦点,并且在输入密码之前不允许您执行任何其他操作。它甚至不允许您更改键盘语言,因此,如果您在重新启动之前使用的语言与密码不同,那么您就完蛋了。我什至无法截取弹出窗口的屏幕截图,这就是为什么图片质量如此之低的原因 - 它来自我的手机。
此问题的部分解决方案是将密钥环密码设置为空字符串,方法是打开应用程序Passwords and Keys
(keyring
在搜索栏中键入)并使用如下菜单:
但这不是一个很好的解决方案,因为密钥环密码不断被重置,并且您必须再次重复相同的过程。我不确定这种情况是否会在某些重新启动时发生,或者在有更新时发生。
所以我的问题是双重的:
我的想法是否正确,密钥环密码不会增加任何安全性,而且是多余的,因为系统使用安全启动,UEFI 设置不允许在没有管理员密码的情况下从任何其他磁盘启动,LUKS 全盘加密,并且笔记本电脑上没有其他用户帐户?
如果(1)是正确的,那么如何永久删除密钥环密码,使其不会再次自动添加?
这个问题是相关的,但答案没有提供解决方法:为什么我的登录密钥环上的“无密码”设置经常重置?
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Run Code Online (Sandbox Code Playgroud)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Run Code Online (Sandbox Code Playgroud)
$ echo $XDG_CURRENT_DESKTOP
ubuntu:GNOME
Run Code Online (Sandbox Code Playgroud)
$ cat /usr/share/gnome/gnome-version.xml
<?xml version="1.0"?>
<gnome-version>
<platform>3</platform>
<minor>36</minor>
<micro>8</micro>
<distributor>Ubuntu</distributor>
<!--<date></date>-->
</gnome-version>
Run Code Online (Sandbox Code Playgroud) 我尝试join
从两个来源制作一个- 从管道和文件。我写了这个简单的单行:
FILENAME=$TMPDIR".netstat"; \
join -t , $FILENAME <(nettop -t wifi -P -x -L1 | cut -d , -f 2,5,6 | tail -n +2) | \
awk '{print $0}'
Run Code Online (Sandbox Code Playgroud)
它通常从 shell 运行,但它不会从 script.sh 运行(完整脚本见下文):
./script.sh: line 16: syntax error near unexpected token `('
Run Code Online (Sandbox Code Playgroud)
我尝试在表达式中使用不同的引号来完全屏蔽变量、参数或命令,但我无法运行脚本。
有人可以帮忙吗?
PS 此脚本由 macOS Sierra 10.12.3 上的 GeekTool(Shell 小部件)调用。
PPS 是的,我知道 OS X 不是“Unix & Linux”,但我认为差别不大。
带有一些注释的完整脚本是:
#!/bin/sh
FILENAME=$TMPDIR".netstat"
# checking if existing stats file
if [ ! -f $FILENAME ]; then
nettop -t …
Run Code Online (Sandbox Code Playgroud) 我正在遵循一个在启动时自动解密硬盘驱动器的指南,使用自生成的密钥和 tpm2 变量,接近尾声时,它使这一点似乎有意义: https: //blastrock.github.io/fde- tpm-sb.html#disable-the-magic-sysrq-key
神奇的 SysRq 键允许运行一些特殊的内核操作。默认情况下,最危险的功能是禁用的,您应该保持这种状态以获得最大的安全性。
例如,其中之一 (f) 将调用 OOM-killer。此功能可能会杀死您的锁屏,从而使恶意用户能够完全访问您的桌面。
问题是我只找到了如何禁用所有sysrq 键,例如https://askubuntu.com/questions/911522/how-can-i-enable-the-magic-sysrq-key-on-ubuntu-desktop或https ://askubuntu.com/questions/11002/alt-sysrq-reisub-doesnt-reboot-my-laptop,使用添加/etc/sysctl.d/90-sysrq.conf
以下行的文件:
kernel.sysrq=1
Run Code Online (Sandbox Code Playgroud)
我希望如果可能的话能够使用所有其他键,例如 REISUB,以防系统崩溃,并且只禁用该F
键。
我还发现这篇文章https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html,其中提到添加一个位掩码,例如:
2 = 0x2 - enable control of console logging level
4 = 0x4 - enable control of keyboard (SAK, unraw)
8 = 0x8 - enable debugging dumps of processes etc.
16 = 0x10 - enable sync command
32 = 0x20 - enable remount read-only
64 = 0x40 - …
Run Code Online (Sandbox Code Playgroud) ubuntu ×2
acpi ×1
bash ×1
files ×1
fingerprint ×1
gnome ×1
magic-sysrq ×1
pam ×1
pipe ×1
security ×1
shell-script ×1
systemd ×1