[問題] vsftp虛擬帳戶無法登入

看板Linux作者 (席伯格)時間16年前 (2009/12/31 16:15), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我半年前有設定過,可正常運作。那時寫下了下面貼出來的那些步驟, 但是現在重試卻不行,一直跟我說 "login incorrect" [root@localhost ~]# ftp localhost Connected to localhost.localdomain. 220 (vsFTPd 2.0.5) 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (localhost:root): john 331 Please specify the password. Password: 530 Login incorrect. Login failed. ftp> 以下是我的步驟.: 1.在/etc/vsftpd底下,編輯虛擬帳號名單,取名為vitural-user_list: #vi /etc/vsftpd/virtual-user_list john 1234 mary 6666 2.將這份名單轉換成資料庫格式: #db_load -T -t hash -f /etc/vsftpd/virtual-user_list /etc/vsftpd/vsftpd_login.db (這個指令需要安裝的套件: db4-utils ) 3.轉換 vsftpd_login.db 的權限 chmod 600 /etc/vsftpd/vsftpd_login.db 4.修改/etc/pam.d/vsftpd: #vi /etc/pam.d/vsftpd auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login.db account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login.db 5.在系統上增加一個帳號,做為所有FTP虛擬帳號的登入身份: #useradd ftpuser 6.修改vsftpd.conf #vi /etc/vsftpd/vsftpd.conf anonymous_enable=NO local_enable=YES local_umask=022 write_enable=NO dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES xferlog_std_format=YES listen=YES chroot_local_user=YES pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES guest_enable=YES guest_username=ftpuser user_config_dir=/etc/vsftpd_user_conf 7.在上面指定的/etc/vsftpd_user_conf資料夾, 新增一個檔案,直接以使用者名稱做檔名,例如john #vi /etc/vsftpd_user_con/john local_root=/home/ftpuser/john write_enable=YES anon_world_readable_only=NO anon_upload_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES 以上。 我有google一下,有的說要改/etc/pam.d/vsftpd那個檔, 有的說要建立builddefs.h檔, 但這些步驟都…比較麻煩,也不太熟。 請問我以上的設定有哪裡出錯嗎? 我半年前上次設定成功時.: 系統:CentOS 5.2 vsftpd版本:vsftpd-2.0.5-12.el5_3.1 現在: 系統:CentOS 5.4 vsftpd版本:vsftpd-2.0.5-16.el5_4.1 拜託幫忙看一下,謝謝。 我找到問題了! 下面這個步驟: #vi /etc/pam.d/vsftpd auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login.db account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login.db 那兩行最後面的 .db 要去掉。雖然檔案全名是那樣,但是這裡不用把副檔名打出來。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.44.183.6 ※ 編輯: Sieberg 來自: 114.44.183.6 (12/31 16:29) ※ 編輯: Sieberg 來自: 114.44.183.6 (12/31 17:47)
文章代碼(AID): #1BF5situ (Linux)