环境:虚拟机centos7和redhat6.5
ssh连接用户密码正常登陆,但是本机命令行下却一直停留在login界面无法登录
通过ssh跟踪/var/log/secure
Feb 17 18:35:59 centos661 login: PAM unable to dlopen(/lib/security/pam_limits.so): /lib/security/pam_limits.so: cannot open shared object file: No such file or directory
Feb 17 18:35:59 centos661 login: PAM adding faulty module: /lib/security/pam_limits.so
Feb 17 18:36:12 centos661 login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Feb 17 18:36:12 centos661 login: Module is unknown
打开 /etc/pam.d/login
注释掉
#session required /lib/security/pam_limits.so
#session required pam_limits.so
问题解决