Centos
無法連接到 Centos 7 伺服器 (PAM)
在嘗試安裝 PAM 模組(我的第一個)後,我一直遇到這個問題。我最終將其刪除,因為該模組已損壞,導致使用者無法訪問系統。現在的情況是我也無法訪問它,即使在刪除它之後也是如此。
如何使用 PAM 解決此故障?
May 2 08:39:28 host sshd[14687]: Received disconnect from 00.000.00.000: 11: May 2 08:39:56 host sshd[14798]: PAM unable to dlopen(/lib64/security/pam_sepermit.so#015): /lib64/security/pam_sepermit.so#015: cannot open shared object file: No such file or directory May 2 08:39:56 host sshd[14798]: PAM adding faulty module: /lib64/security/pam_sepermit.so#015 May 2 08:39:56 host sshd[14798]: PAM _pam_load_conf_file: unable to open /etc/pam.d/password-auth#015 May 2 08:39:56 host sshd[14798]: PAM unable to dlopen(/lib64/security/pam_nologin.so#015): /lib64/security/pam_nologin.so#015: cannot open shared object file: No such file or directory May 2 08:39:56 host sshd[14798]: PAM adding faulty module: /lib64/security/pam_nologin.so#015 May 2 08:39:56 host sshd[14798]: PAM _pam_load_conf_file: unable to open /etc/pam.d/password-auth#015 May 2 08:39:56 host sshd[14798]: PAM _pam_load_conf_file: unable to open /etc/pam.d/password-auth#015 May 2 08:39:56 host sshd[14798]: PAM unable to dlopen(/lib64/security/pam_loginuid.so#015): /lib64/security/pam_loginuid.so#015: cannot open shared object file: No such file or directory May 2 08:39:56 host sshd[14798]: PAM adding faulty module: /lib64/security/pam_loginuid.so#015 May 2 08:39:56 host sshd[14798]: PAM unable to dlopen(/lib64/security/pam_namespace.so#015): /lib64/security/pam_namespace.so#015: cannot open shared object file: No such file or directory May 2 08:39:56 host sshd[14798]: PAM adding faulty module: /lib64/security/pam_namespace.so#015 May 2 08:39:56 host sshd[14798]: PAM _pam_load_conf_file: unable to open /etc/pam.d/password-auth#015 May 2 08:39:56 host sshd[14798]: Failed password for root from 00.000.00.000 port 55835 ssh2
每個未找到的文件名
#015
的末尾都有一個。這不正常。由於八進制數015
是用於輸入 (CR) 的 ASCII 碼,因此在我看來,您可能會/etc/pam.d
在其中編輯某些文件,使其變為 DOS/Windows 模式(行尾的 CRLF 而不是 Linux/Unix LF-only行結束)。您需要啟動到救援模式並從備份中恢復損壞的文件。您也可以使用命令擺脫
\015
字元。tr