centos 普通用户无法登录

打开文件:

1
vim /etc/security/access.conf

添加:

1
-:ALL EXCEPT root <username>:ALL

生效:

1
source /etc/security/access.conf

参考资料:

https://www.ibm.com/developerworks/cn/aix/library/au-sshlocks/index.html