LINUX普通使用者登陸報錯__LINUX

來源:互聯網
上載者:User

1,剛初始化後的LINUX主機,建立使用者後登陸報Connection closed

hadoop@cnsz0804's password:
Connection closed by 10.12.25.114

 

2,檢查/var/log/secure發現如下報錯

Feb 17 16:36:26 cnsz0804 sshd[15800]: Connection closed by 10.12.24.18
Feb 17 16:39:48 cnsz0804 sshd[16093]: Connection closed by 10.12.24.18
Feb 17 17:18:51 cnsz0804 sshd[19952]: pam_access(sshd:account): access denied for user `hadoop' from `10.12.25.113'
Feb 17 17:18:51 cnsz0804 sshd[19952]: Failed password for hadoop from 10.33.25.113 port 63686 ssh2
Feb 17 17:18:51 cnsz0804 sshd[19953]: fatal: Access denied for user hadoop by PAM account configuration
Feb 17 17:20:16 cnsz0804 sshd[20107]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.12.25.113  user=chkusr

 

3,檢查發現/etc/security/access.conf檔案尾有如下配置

# All other users should be denied to get access from all sources.
#- : ALL : ALL
+:ALL:bond0... localhost
+:ALL:10.11.77.
+:ALL:10.11.100.
+:ALL:10.11.108.
+:ALL:10.11.111.
+:ALL:10.31.177.
+:ALL:10.37.100.
+:ALL:10.57.0.
-:ALL EXCEPT usr03 usr01 deploy log :ALL
-:chkusr iaopr serviceop deployop logop: 10.13. 10.42. 10.43. 10.50

去掉如上配置後可以正常登陸

 4,修改替換

sed -i '123,$s/^/#/' /etc/security/access.conf
sed -n '123,$p' /etc/security/access.conf

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.