root登陸530 Permission denied、530 Login incorrect解決
阿新 • • 發佈:2018-11-14
背景:由於雲平臺上22埠不對外放開,sftp使用不了,故選擇ftp服務
作業系統版本:
上傳ftp包、安裝ftp服務:
[[email protected] tmp]# ll 總用量 172 drwx------. 2 root root 16384 8月 2 17:39 lost+found -rw-r--r-- 1 root root 158772 3月 22 2017 vsftpd-2.2.2-24.el6.x86_64.rpm [[email protected] tmp]# rpm -ivh vsftpd-2.2.2-24.el6.x86_64.rpm Preparing... ########################################### [100%] 1:vsftpd ########################################### [100%]
重啟ftp服務:
[[email protected] tmp]# service vsftpd restart 關閉 vsftpd: [失敗] 為 vsftpd 啟動 vsftpd: [確定]
檢視21埠狀態:
[[email protected] tmp]# netstat -an|grep 21 tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN unix 2 [ ] DGRAM 12145 @/org/kernel/udev/udevd unix 3 [ ] DGRAM 12165 unix 3 [ ] DGRAM 12164
root登陸報錯“530 Permission denied”:
[[email protected] tmp]# ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1). 220 (vsFTPd 2.2.2) Name (127.0.0.1:root): root 530 Permission denied. Login failed. ftp>
問題解決:
註釋user_list配置檔案的root使用者
[[email protected] tmp]# view /etc/vsftpd/user_list # vsftpd userlist# If userlist_deny=NO, only allow users in this file # If userlist_deny=YES (default), never allow users in this file, and # do not even prompt for a password. # Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers # for users that are denied. #root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody
再次以root登陸,報錯“530 Login incorrect”:
[[email protected] tmp]# ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1). 220 (vsFTPd 2.2.2) Name (127.0.0.1:root): root 331 Please specify the password. Password: 530 Login incorrect. Login failed. ftp>
問題解決:
註釋配置檔案ftpusers的root使用者
[[email protected] tmp]# view /etc/vsftpd/ftpusers # Users that are not allowed to login via ftp #root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody
重新登陸,成功:
[[email protected] tmp]# ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1). 220 (vsFTPd 2.2.2) Name (127.0.0.1:root): root 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 227 Entering Passive Mode (127,0,0,1,118,246). 150 Here comes the directory listing. -rw------- 1 0 0 2172 Aug 02 10:58 anaconda-ks.cfg -rw-r--r-- 1 0 0 28568 Aug 02 10:58 install.log -rw-r--r-- 1 0 0 8442 Aug 02 10:54 install.log.syslog 226 Directory send OK. ftp>