歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

登錄模式改成init 3後無法登錄

今天為了測試方便,將登錄模式改成了init 3,發現居然無法登錄,用SSH連接正常,登錄後查了幾個日志後無果,後來打開Secure安全日志( less /var/log/secure)發現,有如下顯示:

Jul 27 19:02:29 oracle su: pam_unix(su-l:session): session closed for user root

Jul 28 09:28:20 oracle sshd[2611]: Server listening on :: port 22.

Jul 28 09:28:20 oracle sshd[2611]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.

Jul 28 09:28:49 oracle login: PAM unable to dlopen(/lib/security/pam_limits.so)

Jul 28 09:28:49 oracle login: PAM [error: /lib/security/pam_limits.so: wrong ELF class: ELFCLASS32]

Jul 28 09:28:49 oracle login: PAM adding faulty module: /lib/security/pam_limits.so

Jul 28 09:28:54 oracle login: pam_unix(login:session): session opened for user root by (uid=0)

Jul 28 09:28:54 oracle login: Module is unknown

Jul 28 09:28:57 oracle login: PAM unable to dlopen(/lib/security/pam_limits.so)

Jul 28 09:28:57 oracle login: PAM [error: /lib/security/pam_limits.so: wrong ELF class: ELFCLASS32]

Jul 28 09:28:57 oracle login: PAM adding faulty module: /lib/security/pam_limits.so

Jul 28 09:28:59 oracle login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)

本欄目更多精彩內容:http://www.bianceng.cn/OS/Linux/

Jul 28 09:28:59 oracle login: Module is unknown

Jul 28 09:29:04 oracle login: PAM unable to dlopen(/lib/security/pam_limits.so)

Jul 28 09:29:04 oracle login: PAM [error: /lib/security/pam_limits.so: wrong ELF class: ELFCLASS32]

Jul 28 09:29:04 oracle login: PAM adding faulty module: /lib/security/pam_limits.so

Jul 28 09:29:06 oracle login: pam_unix(login:auth): check pass; user unknown

Jul 28 09:29:06 oracle login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost=

Jul 28 09:29:06 oracle login: pam_succeed_if(login:auth): error retrieving information about user sys

Jul 28 09:29:08 oracle login: FAILED LOGIN 1 FROM (null) FOR sys, User not known to the underlying authentication module

Jul 28 09:29:38 oracle login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost=  user=oracle

Jul 28 09:29:39 oracle login: FAILED LOGIN 2 FROM (null) FOR oracle, Authentication failure

Jul 28 09:29:48 oracle login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost=  user=root

Jul 28 09:29:50 oracle login: FAILED LOGIN 3 FROM (null) FOR root, Authentication failure

Jul 28 09:30:03 oracle login: PAM unable to dlopen(/lib/security/pam_limits.so)

Jul 28 09:30:03 oracle login: PAM [error: /lib/security/pam_limits.so: wrong ELF class: ELFCLASS32]

Jul 28 09:30:03 oracle login: PAM adding faulty module: /lib/security/pam_limits.so

Jul 28 09:30:05 oracle login: pam_unix(login:auth): check pass; user unknown

Jul 28 09:30:05 oracle login: pam_unix(login:auth): authentication failure; logname= uid=0 euid=0 tty=tty2 ruser= rhost=

有提示/lib/security/pam_limits.so這個庫有問題,既然查找了一下find / -name  pam_limits.so 發現有兩個一樣的庫文件:

[root@oracle ~]# find / -name pam_limits.so

/lib/security/pam_limits.so

/lib64/security/pam_limits.so

[root@oracle ~]#

由於我的系統是64位的CentOS,隨即將login裡面加載的庫文件給修改成64位庫中的文件:vi /etc/pam.d/login的最後一後修正為:session required /lib64/security/pam_limits.so

Reboot後在終端上登錄init 3進入字符界面一切正常!

Copyright © Linux教程網 All Rights Reserved