Linux中ftp連線530錯誤的解決方法
在工作經常會遇見這個問題,在Windows上使用ftp命令登入Linux伺服器時會有這樣的提示:530 Must perform authentication before identifying USER。經過網上的查詢終於找的解決得方案。首先謝謝提供解決方案的高手們。本人特借鑑過來,做此記錄只為學習使用。目前本人知道解決方法如下:
首先,如果正在使用vsftpd,可以先把其停掉,命令:service vsftpd stop,接下來需要編輯/etc/xinetd.d/下的gssftp配置檔案,檔案內容如下:
# default: off
# description: The kerberized FTP server accepts FTP connections
# that can be authenticated with Kerberos 5.
service ftp
{
disable = yes
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l -a
log_on_failure += USERID
}
在檔案中,我們要修改的內容有:
1、disable = yes 改為 disable =no ,系統預設ftp功能是無效的,修改使ftp功能生效。
2、server_args = -l -a 改為 server_args = -l。
without -a means : *enable weak authentication*
其中表示使用Kerberos 5驗證機制,而一般的ftp是不支援該驗證機制的。
修改完畢後,將其儲存。
3、重啟啟動xinetd服務。請執行一下的命令(/etc/xinetd.d/):
service xinetd restart
service vsftpd restart
注:
1、建議gssftp配置檔案中的user(user = root)不要使用root,最好使用其他的使用者。
2、在Linux RHEL 5 或者更高版本中可能不存在gssftp,本人還沒有接觸到。