CentOS/RHEL 7 fprintd 将消息记录到 /var/log/messages

问题

即使在 /etc/sysconfig/authconfig文件中配置了USEFPRINTD=no ,在/var/log/messages中还是会记录来自 fprintd 服务的错误消息,如下所示。

# tail /var/log/messages
Jan 22 13:58:09 hostname dbus[914]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jan 22 13:58:09 hostname dbus-daemon: dbus[914]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Jan 22 13:58:09 hostname fprintd: ** (fprintd:45376): WARNING **: fprint init failed with error -99
Jan 22 13:58:09 hostname systemd: fprintd.service: main process exited, code=exited, status=157/n/a
Jan 22 13:58:09 hostname systemd: Unit fprintd.service entered failed state.
Jan 22 13:58:09 hostname systemd: fprintd.service failed.

即使在运行命令禁用 fprintd 后也会发生这种情况:

# authconfig --disablefingerprint --update
on  it road.com

解决方案

fprintd 是一个静态服务,即使在 /etc/sysconfig/authconfig 中 USEFPRINTD=no 的情况下,它也可以由向系统 Dbus 发送消息“net.reactivated.Fprint”的人启动。

# cat /usr/share/dbus-1/system-services/net.reactivated.Fprint.service
[D-BUS Service]
Name=net.reactivated.Fprint
Exec=/usr/libexec/fprintd
User=root
SystemdService=fprintd.service
# systemctl list-unit-files | grep fprintd 
fprintd.service static

要解决此问题,如果不需要指纹授权,请卸载“fprintd”包以消除消息。

# yum remove fprintd

或者

# rpm -e fprintd

如果已安装依赖包“fprintd-pam”,请在删除 fprintd 之前将其删除。

日期:2020-09-17 00:13:04 来源:oir作者:oir