X64 Linux无法从本地字符界面登陆解决

X64 Linux无法从本地字符界面登陆解决
 
经常有怪事发生。话说,我有一台负责squid的服务器,远程登陆好好的就一直由她好好地。 今天要改个网关,于是就接了个显示器在本地操作。
 
当输入完用户名 root 密码 * 回车 哟,又让我再输一次?? 好了,我再输了,还是这样!死活就账号认证的界面登陆不上。
 
丫的,服务器被黑了?? 用笔记本登陆却一切正常。 查看服务器安全日志:
 
tail -50 /var/log/secure
发现有以下错误:
 
May 2 18:45:41 server1 login: PAM unable to dlopen(/lib/security/pam_limits.so) May 2 18:45:41 server1 login: PAM [error: /lib/security/pam_limits.so: wrong ELF class: ELFCLASS32] May 2 18:45:41 server1 login: PAM adding faulty module: /lib/security/pam_limits.so May 2 18:45:45 server1 login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= user=root May 2 18:45:46 server1 login: FAILED LOGIN 1 FROM (null) FOR root, Authentication failure May 2 18:46:05 server1 login: FAILED LOGIN 2 FROM (null) FOR root, Authentication failure May 2 18:46:15 server1 login: pam_unix(login:session): session opened for user root by LOGIN(uid=0) May 2 18:46:15 server1 login: Module is unknown
 
由于操作系统是 RedHat As5.3 X64 之前的经验暗示我,这很有可能跟 X64 类文件的存放路径有关。 于是编辑登陆配置文件:
 
vim /etc/pam.d/login
把最下一行 session required /lib/security/pam_limits.so
 
修改为: session required /lib64/security/pam_limits.so
 
保存并退出。 再试试在本地登陆,成功!日志没再报错了。

参考文章

修改后的/etc/pam.d/login文件

#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
-session   optional     pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so
posted @ 2014-07-24 13:53  ArcerZhang  阅读(745)  评论(0编辑  收藏  举报