CentOS自动更新到6.5后root无法登陆问题解决

实验室CentOS服务器不知道被谁更新系统到6.5后,发现在本机上即使输入正确的密码也无法登陆,通过在google搜索,发现有一些人也碰见过同样的问题,但是他们是因为系统变为64位后,无法找到pam_limits.so的正确路径,但是我的主机不是这种问题,更新的后依然是i686架构,继续搜索,一步步查找问题,首先修改grub进入单用户模式下,打开sshd服务,从远程主机登陆,发现可以登陆,但就是本地不行,于是乎继续锁定问题到/etc/pam.d/login文件,cat /etc/pam.d/login文件,发现内容如下:
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
authincludesystem-auth
accountrequiredpam_nologin.so
accountincludesystem-auth
passwordincludesystem-auth
# pam_selinux.so close should be the first session rule
sessionrequiredpam_selinux.so close
sessionrequiredpam_loginuid.so
sessionoptionalpam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
sessionrequiredpam_selinux.so open
sessionrequiredpam_namespace.so
sessionoptionalpam_keyinit.so force revoke
sessionincludesystem-auth
-sessionoptionalpam_ck_connector.so并没有想象中的pam_limits.so文件,修改成如下:
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
authincludesystem-auth
accountrequiredpam_nologin.so
accountincludesystem-auth
passwordincludesystem-auth
# pam_selinux.so close should be the first session rule
sessionrequiredpam_limits.so
sessionoptionalpam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
sessionrequiredpam_limits.so
sessionrequiredpam_namespace.so
sessionoptionalpam_keyinit.so force revoke
sessionincludesystem-auth
-sessionoptionalpam_ck_connector.so重启系统,进入多用户模式下,输入密码,发现可以登陆!!
思考:
1.为什么修改后就可以呢?

推荐阅读