无法进入init 3 字符界面
短信预约 -IT技能 免费直播动态提醒
今天为了测试方便,将登录模式改成了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)
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=
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)
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
/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进入字符界面一切正常!
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341