We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UOS20 1060系统上编写自定义的pam模块,代码如下(只是一个样例):
#include <security/pam_modules.h> #include <security/pam_ext.h> #include <string.h> // PAM模块入口函数,实现用户认证功能 PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) { const char *username = NULL; const char *password = NULL; int retval; // 获取用户名和密码 retval = pam_get_user(pamh, &username, "Username: "); if (retval != PAM_SUCCESS) { return retval; } retval = pam_get_authtok(pamh, PAM_AUTHTOK, &password, "Password: "); if (retval != PAM_SUCCESS || password == NULL) { return retval; } // 进行身份验证 if (strcmp(username, "test") != 0 || strcmp(password, "123abc") != 0) { return PAM_AUTH_ERR; } return PAM_SUCCESS; }
pam配置文件如下(/etc/pam.d/common-auth): auth [success=done auth_err=die ignore=ignore default=bad] /usr/lib/security/libtest_pam.so
test@uos-PC:~$ ls /usr/lib/security/ libtest_pam.so pam_udcp.so
OS: UOS20 1060 桌面专业版 dde-session-shell 5.6.21-1 dde-session-ui 5.6.16-1 lightdm 1.26.7.19-1+dde
No response
登录界面无密码输入框
The text was updated successfully, but these errors were encountered:
dde-session-shell 5.6.21-1 修复??? src\lightdm-deepin-greeter\greeterworker.cpp
Sorry, something went wrong.
No branches or pull requests
SUMMARY | 问题概要
UOS20 1060系统上编写自定义的pam模块,代码如下(只是一个样例):
pam配置文件如下(/etc/pam.d/common-auth):
auth [success=done auth_err=die ignore=ignore default=bad] /usr/lib/security/libtest_pam.so
test@uos-PC:~$ ls /usr/lib/security/
libtest_pam.so pam_udcp.so
SOFTWARE/OS VERSIONS | 软件/系统版本信息
OS: UOS20 1060 桌面专业版
dde-session-shell 5.6.21-1
dde-session-ui 5.6.16-1
lightdm 1.26.7.19-1+dde
PRE-REQUIREMENT | 预置条件
No response
STEPS TO REPRODUCE | 复现步骤
OBSERVED RESULT | 观察到的结果
登录界面无密码输入框
EXPECTED RESULT | 期望的结果
ADDITIONAL INFORMATION | 额外补充
No response
The text was updated successfully, but these errors were encountered: