LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-24-2005, 11:03 AM   #1
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Rep: Reputation: 15
vsftpd can't login as anonymous?


I can't login vsftpd as anonymous, get:
Login failed: 500 OOPS: vsftpd: refusing to run with writable anonymous root
No matter xinetd or standalone mode.

I suspicious about the account of vsftpd process:
# ps aux | grep vsftpd
root 2453 0.0 0.3 1484 380 pts/0 S 01:05 0:00 vsftpd
Is there any influence of that? How can I change it?

thanks.

Last edited by Chowroc; 01-24-2005 at 11:28 AM.
 
Old 01-24-2005, 12:08 PM   #2
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
look for called vsftpd.conf under /etc/vsftpd/

follow the steps below.

Login as root user.

open console at console type

vi /etc/vsftpd/vsftpd.conf

search for following option and change with YES.

#Allow anoymous FTP?
anonymous_enable= YES

save & exit and try with following command.

ftp localhost

Hope this helps.

-/Hitesh
 
Old 01-24-2005, 04:50 PM   #3
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
I of course have:
anonymous_enable= YES

I make user: ftp 's home to be /mnt/file/ftp (/mnt/file--/dev/hda8), and:
# chown ftp.ftp /mnt/file/ftp
# chmod 775 /mnt/file/ftp
I don't think this is the problem, because when I change it back to /var/ftp, the problem remains.

thanks.
 
Old 01-24-2005, 09:21 PM   #4
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
U don't need to make any changes to login as anonymous, i do no know why this error u r getting.

what you can do is, try uninstall vsftpd package, reinstall it and try again. it's works for me as user as well as anonymous.

So try that and check.

-/Hitesh
 
Old 01-25-2005, 09:00 AM   #5
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
I re-install vsftpd, and use the default /etc/vsftpd.conf, the problem remains :-(

still thank you.
 
Old 01-25-2005, 10:30 PM   #6
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
just do one thing, post the deftails of vsftpd.conf, vsftpd.ftpuser and vsftpd_users files.

we will try to troubleshoot this issue.

-/Hitesh
 
Old 01-26-2005, 08:38 AM   #7
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
This is the default vsftpd.conf:

anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
pam_service_name=vsftpd

I can't use anonymous with it.

/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

/etc/vsftpd.user_list:
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

I add a user like this: in /etc/passwd:
Qin:x:5001:5001::/mnt/file/ftp:/sbin/nologin
add Qin in vsftpd.chroot_list, and now I can just login as Qin, but still can't login as anonymous.

thanks.

Last edited by Chowroc; 01-26-2005 at 08:52 AM.
 
Old 01-26-2005, 10:30 AM   #8
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
OK, it seems all the configurations are ok.

r u trying to login from client? or on localhost?

try with the following command.

service vsftpd restart

ftp localhost

username: anonymous
password: press enter [do not enter password]

and check. if you get any error, post it here.

-/Hitesh
 
Old 01-26-2005, 11:40 AM   #9
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
There is no script of vsftpd in my /etc/init.d/, I can only do this:
# killall vsftpd
# vsftpd start

then:
$ ftp localhost
Connected to localhost (127.0.0.1).
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (localhost:roc): anonymous
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable anonymous root
Login failed.
421 Service not available, remote server has closed connection
ftp>
 
Old 01-26-2005, 11:42 AM   #10
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
What's the means of "421"?

When I login successfully as an avialabe user, the number is "230": "230 Login successful"?

thanks
 
Old 01-26-2005, 12:24 PM   #11
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
"421 service not available, remote server has closed connection.''

Means:

If an FTP server won't allow logins, it is probably configured correctly, but the problem is probably with authorizing users at login. FTP servers in current distriubtions often authorize users with the Pluggable Authentication Modules library, in which case there should be an authorization file /etc/pam.d/ftp. A generic authorization file looks like this. (The line break on the first "auth" line is for readability. The entry is actually a single, long line).

#%PAM-1.0
auth required /lib/security/pam_listfile.so item=user \
sense=deny file=/etc/ftpusers onerr=succeed
auth required /lib/security/pam_pwdb.so shadow nullok
auth required /lib/security/pam_shells.so
account required /lib/security/pam_pwdb.so
session required /lib/security/pam_pwdb.so


Also, make sure the /etc/ftpusers file, or whatever users file is named in the first "auth" line, is configured correctly.

just check this file for correct auth line.

Login as root user.

cat /etc/pam.d/vsftpd

which disctribution r u currently using? For it working like charm. i have tested on rHL 9 , RHEL 3 and SUSE.

any let try this, hope this helps.

-/Hitesh
 
Old 01-26-2005, 06:54 PM   #12
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
This is my /etc/pam.d/vsftpd
Code:
#%PAM-1.0
auth       required     /lib/security/pam_listfile.so item=user sense=deny file=
/etc/vsftpd.ftpusers onerr=succeed
auth       required     /lib/security/pam_stack.so service=system-auth
auth       required     /lib/security/pam_shells.so
account    required     /lib/security/pam_stack.so service=system-auth
session    required     /lib/security/pam_stack.so service=system-auth
I don't think there is any problem. The /etc/pam.d/system-auth like this:
Code:
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      /lib/security/pam_env.so
auth        sufficient    /lib/security/pam_unix.so likeauth nullok
auth        required      /lib/security/pam_deny.so

account     required      /lib/security/pam_unix.so

password    required      /lib/security/pam_cracklib.so retry=3 type=
password    sufficient    /lib/security/pam_unix.so nullok use_authtok md5 shado
w
password    required      /lib/security/pam_deny.so

session     required      /lib/security/pam_limits.so
session     required      /lib/security/pam_unix.so
My distribution: RH8.
 
Old 02-03-2005, 10:41 PM   #13
Chowroc
Member
 
Registered: Dec 2004
Posts: 145

Original Poster
Rep: Reputation: 15
What's the differences between the account which I set /sbin/nologin as the shell and the anonymous account?

Thank you.
 
Old 02-03-2005, 11:22 PM   #14
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
i will try looking into nologin issue, but why don't you try with wu-ftpd.

visit the following link at,

http://www.wu-ftpd.org/wu-ftpd-faq.html

hope this helps you.

-/Hitesh
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd anonymous login r.stiltskin Linux - Networking 4 03-16-2007 11:19 PM
Proftpd Anonymous login sxp03m Red Hat 0 10-28-2003 06:55 AM
Anonymous login FTP hkgonra Mandriva 8 10-07-2003 05:30 PM
Proftpd Anonymous login badsvt351 Linux - Networking 2 02-15-2002 05:15 PM
anonymous login question hazza96 Linux - Networking 1 07-16-2001 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration