DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 21st October 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default VSFTPD Server Issues!!

Hi everyone
I followed the guide provided by vsftp's examples and I can't get my desired username and password to work.

1) I have create a file in /etc/
Code:
[root@192 /usr/local/etc]# cat /etc/logins.txt 
jojo
zhoufengping
2) I loaded the file into berkeleyDB
Code:
db_load-4.2 -T -t hash -f logins.txt /etc/vsftp_login.db 
chmod 600 /etc/vsftpd_login.db
3) I Created a pam file, /etc/pam.d/vsftpd.pam
Code:
[root@192 /etc]# cat /etc/pam.d/vsftpd.pam 
auth    required /usr/local/lib/pam_pwdfile.so pwdfile /etc/vsftpd_login.db
account required /usr/lib/pam_permit.so
4) I created a new user virtual with NO PASSWORD
[code]
cat /etc/passwd | grep virtual
virtual:*:1002:1006:virtual:/usr/mount/50gb/ftp:/usr/sbin/nologin
[code]

5) And then I followed the guide and copied /etc/hosts to my ftp area
Code:
cp /etc/hosts /usr/mount/50gb/ftp/
chown virtual:virtual /usr/mount/50gb/ftp/hosts
6) Now this is my conf
Code:
[root@192 /etc]# cat /usr/local/etc/vsftpd.conf
anonymous_enable=NO
local_enable=YES

write_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO

chroot_local_user=YES

guest_enable=YES
guest_username=virtual

listen=YES
listen_port=21

secure_chroot_dir=/usr/local/share/vsftpd/empty
7) And I started my server
/usr/local/libexec/vsftp &
No error

8)However, when I try to login,
Code:
[root@192 /etc]# ftp localhost
Trying 127.0.0.1...
Connected to localhost.
220 (vsFTPd 2.0.7)
Name (localhost:root): zhou
331 Please specify the password.
Password:
530 Login incorrect.
ftp: Login failed.
ftp> close
221 Goodbye.
ftp> ftp localhost
Trying 127.0.0.1...
Connected to localhost.
220 (vsFTPd 2.0.7)
Name (localhost:root): virtual
331 Please specify the password.
Password:
530 Login incorrect.
ftp: Login failed.
ftp> close
221 Goodbye.
ftp>
None of my user names work.

What the hell is wrong? Why can't vsftp read my database generated by db_load???
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure VSFTPD? Sunsawe FreeBSD Ports and Packages 8 26th September 2009 02:28 PM
VSFTPD SERVER disappearedng FreeBSD General 1 21st October 2008 04:12 AM
FreeBSD Server issues Crypt FreeBSD General 4 10th October 2008 07:44 PM
VSFTPd: pid file kostromin FreeBSD Ports and Packages 0 4th July 2008 08:35 AM
vsftpd stucks in close() sunnyone FreeBSD Ports and Packages 0 10th June 2008 10:49 AM


All times are GMT. The time now is 09:47 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick