【发布时间】:2020-02-20 14:15:02
【问题描述】:
我已经编写了自己的自定义 Linux-pam 模块,该模块将调用面部识别软件(C 中嵌入 Python3)来识别用户面部,并随后提供身份验证。
我遇到了一个问题,每当我修改 /etc/pam.d/sudo 文件以使用我的 pam_authnew.so 模块时,都会出现错误
PAM module not found
我已将 C 文件编译为 .so,我已将所述文件加载到 /lib/x86_64/security(我所有其他默认 pam 模块所在的位置)
以下是 /etc/pam.d/sudo 、 /lib/x86_64-linux-gnu/security 和 /etc/var/auth.log 文件,以帮助进行故障排除。
/etc/pam.d/sudo
session required pam_env.so readenv=1 user_readenv=0
session required pam_env.so readenv=1 envfile=/etc/default/locale user_rea$
#@include common-auth
@include common-account
@include common-session-noninteractive
/etc/var/auth.log
Feb 20 14:11:58 berns-HP-Pavilion-Laptop-15-cw0xxx sudo: PAM unable to dlopen(/lib/x86_64-linux-gnu/security/pam_authnew.so): /lib/x86_64-linux-gnu/security/pam_authnew.so: undefined symbol: Py_Initialize
Feb 20 14:11:58 berns-HP-Pavilion-Laptop-15-cw0xxx sudo: PAM adding faulty module: /lib/x86_64-linux-gnu/security/pam_authnew.so
Feb 20 14:11:58 berns-HP-Pavilion-Laptop-15-cw0xxx sudo: berns : PAM authentication error: Module is unknown ; TTY=pts/1 ; PWD=/home/berns ; USER=root ; COMMAND=/usr/bin/apt update
【问题讨论】: