Password
螢幕鎖定檢查密碼文件但不檢查 Active Directory
我們有一個執行 Centos 7 的 Linux 系統,但螢幕鎖定存在問題。我們有一個多使用者環境,每個使用者都有自己的帳戶。身份驗證使用我們大學的活動目錄。只有本地帳戶使用密碼和影子文件,並且實際上如果本地帳戶鎖定螢幕,他們能夠解鎖它。所有其他使用者都使用 AD 進行身份驗證,並在嘗試時收到身份驗證錯誤。
We are using sssd. This from secure log: Oct 30 08:59:54 b400 kcheckpass[94374]: pam_listfile(kscreensaver:auth): Refused user teach for service kscreensaver Oct 30 08:59:55 b400 kcheckpass[94374]: pam_sss(kscreensaver:auth): authentication failure; logname=syin uid=1005 euid=1005 tty=:0 ruser= rhost= user=teach Oct 30 08:59:55 b400 kcheckpass[94374]: pam_sss(kscreensaver:auth): received for user teach: 17 (Failure setting user credentials) Oct 30 09:00:02 b400 gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session opened for user gdm by ouidad(uid=0) Oct 30 09:00:03 b400 polkitd[663]: Registered Authentication Agent for unix-session:c243 (system bus name :1.20066 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) This from messages: Oct 30 08:59:55 b400 [sssd[krb5_child[94379]]]: Preauthentication failed Oct 30 08:59:55 b400 [sssd[krb5_child[94379]]]: Preauthentication failed Oct 30 08:59:55 b400 [sssd[krb5_child[94379]]]: Preauthentication failed Oct 30 08:59:55 b400 kcheckpass[94374]: Authentication failure for teach (invoked by uid 1005)
sssd 日誌要麼是空的,要麼沒有提供任何線索。我該怎麼做才能確保在登錄時檢查 AD 而不是 passwd/shadow 文件以進行螢幕解鎖?
我們想通了…位於 /etc/pam.d 的 kscreensaver 文件在恢復更新期間配置錯誤。我們有 kscreensaver 配置文件的備份文件,並使用 cp 命令簡單地複製到更新前的原始狀態。
#%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. # auth required pam_listfile.so file=/etc/allowed.nmr.users item=user sense=allow onerr=fail auth required pam_env.so auth sufficient pam_fprintd.so auth [default=1 success=ok] pam_localuser.so auth [success=done ignore=ignore default=die] pam_unix.so nullok try_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet_success auth sufficient pam_sss.so forward_pass auth required pam_deny.so account required pam_unix.so account sufficient pam_localuser.so account sufficient pam_succeed_if.so uid < 1000 quiet account [default=bad success=ok user_unknown=ignore] pam_sss.so account required pam_permit.so password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type= password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok password sufficient pam_sss.so use_authtok password required pam_deny.so session optional pam_keyinit.so revoke session required pam_limits.so -session optional pam_systemd.so session optional pam_oddjob_mkhomedir.so umask=0077 session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so session optional pam_sss.so
systemctl rstart sssd
我們重新啟動了 sssd 並恢復了活動目錄使用者的解鎖功能。