LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-26-2006, 09:20 AM   #1
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Rep: Reputation: 31
vsftpd user login problems in RHEL4


HI,
this is my vsftpd.conf file

listen=YES

tcp_wrappers=NO

local_umask=022

anonymous_enable=NO

local_enable=YES

nopriv_user=ftp

pam_service_name=vsftpd

#anon_root=/var/ftp

#uname -a
Linux [myPCname] 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686
i686 i386 GNU/Linux

Im using vsftpd-2.0.1-5..After stopping iptables Im able to use ftp as
anonymous user but am not able to log on as a user...

Please advise..its urgent.

Danish
 
Old 07-27-2006, 07:10 AM   #2
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Rep: Reputation: 15
hello
ftp uses /etc/shells to see if the shell (/bin/bash, /bin/csh ..) is listed or not for system users. check that to see as your shell must be listed in /etc/shells. also check your vsftpd/user_list and /etc/ftpaccess to see . also check your /etc/hosts.allow to check....

bye
 
Old 07-27-2006, 02:31 PM   #3
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
Hmm...by default probably(Im a bi tout of touch) vsftpd blocks everybody?..Look at the files sambyte has suggested...and also look at

1./etc/vsftpd.ftpusers
2./etc/vsftpd/vsftpd.users

Is there any files in /etc/vsftpd that end in deny? ; say vsftpd.deny .. open it up and check...remove uers from these files (those whom you want to grant ftp access to) ; keep root inside though...dont think you'd want root to get direct ftp access...and why is anonymous ftp on? turn it off...its a security risk...
 
Old 07-28-2006, 01:49 AM   #4
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Hi,
thanks for replying...I still havent found any succes with vsftpd.
These are the results of the questions posted

#grep danish /etc/passwd
danish:x:509:509::/home/danish:/bin/bash

#cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/ash
/bin/bsh
/bin/ksh
/usr/bin/ksh
/usr/bin/pdksh
/bin/tcsh
/bin/csh
/bin/zsh

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

There was no /etc/ftpaccess file so I did a
#find / -type f -name "ftpaccess" -print
but still coudnt find one

The iprange of my LAN is allowed in /etc/hosts.allow

In hosts.deny ALL:ALL is mentioned

There is no file ending with .deny is /etc/vsftpd

Im still looking to solve this riddle

Thanks
Danish
 
Old 07-28-2006, 03:14 PM   #5
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
Danish...I think u already have the answer...please read my previous post carefully..and go read the FTP docs if still not clear....
 
Old 07-29-2006, 04:56 AM   #6
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
I really dont understand where Im making the mistake..I tried putting my username in the vsftpd.user_list

and when I tried logging in using my usrname it said I didnt have permission. So i removed my username and tried again but now after accepting the username and passwd , the browser just hangs..

I know its a silly mistake because when I downloaded and installed an rpm package of vsftpd from fedora mirror site on another linux box..vsftpd was working fine..

But I just am not able to figure out this one


Danish
 
Old 07-29-2006, 06:30 AM   #7
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
Oh well...here you go... .. I ws trying to get you to do it yourself ...never mind .. maybe next time...Here's a link...which should help...

http://www.vsftpdrocks.org/rpm/

And really...you should google around a bit more... i found this in 1 minute...try and figure out things yourself..use the Internet...u have evrything available there...that way u dont forget stuff that easy...

Cheers
Arvind
 
Old 07-29-2006, 07:58 AM   #8
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Thanks for helping me out.. Finally it worked but thats only if I do
#ftp localhost

on the remote server....

and also the link that you gave has a tutorial which has some old directions. There were many options which I had to put my self after going through the damn man pages..[maybe atleast fifty times] But I really do appreciate that you were trying to help me out so that I could do it myself..

Just to let you know...Ive actually just started out, so i dont know much..maybe thats why Im a bit slow. and I know i can be really dumb sometimes....

ne ways! the other problem is that I cant log into the remote ftp server using a browser from my linux box..Its only the remote server shell which gives me ftp acces after I do
#ftp localhost

Thanks
Danish
 
Old 07-29-2006, 09:34 AM   #9
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
Hold on .. are you saying this...??

Server# ftp localhost

This works...this will work

UrBox# ftp serverIP

This doesnt work...Why isnt this working???

Apologies if I misunderstood you...post back...

And sorry if I went a bit harsh on u ... even I ws like that when I started out...but remember google is your friend ..always!!
 
Old 07-31-2006, 12:47 AM   #10
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Sorry, I couldnt post yesterday cos it was a sunday..

No apologies..cmon..I appreciate what u were doing..and I know thats the only way one learns...Thanks for ur advice

Getting back to the topic..



When Im on the server and then when I do on the command line

#ftp localhost

I get connected as a user

and I just tried.. Doing

#ftp serverIP
on my linuxbox does connect me to the server's vsftpd server on the remote machine....

But doing ftp://serverIP on the firefox browser on my machine just gets me to the point where I get a dialog box asking for the username and passwd, but when I enter it, the browser just hangs and after some minutes time's out.
 
Old 07-31-2006, 01:10 AM   #11
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Rep: Reputation: 15
hello,
But doing ftp://serverIP on the firefox browser on my machine just gets me to the point where I get a dialog box asking for the username and passwd

i have a ftp server but when i type ftp://serverIP in a browser it does not ask for an password.....
it automatically takes me to the /var/ftp/pub directory.....

secondly...
u said that ur ftp serverIP is not working ... that sounds a bit complicated...
try restarting the network service and make the changes in /etc/hosts
like serverIP localhost alias

and check if it works or not

pls post back to send the latest developments...
 
Old 07-31-2006, 02:59 AM   #12
dsids
Member
 
Registered: Mar 2006
Distribution: FC4
Posts: 184

Original Poster
Rep: Reputation: 31
Ok...Im going to write down in steps what I meant..

1 . My ftp server is qorking fine with IP a.b.c.d

When I log on to 172.17.1.197 using ssh and then at the command line do

2 . ftp localhost
I have to enter the username and password to log to the server

3. From my linux box when I do ftp a.b.c.d on the command line, to the remote server, I get connected and get a directory listing by doing #ls

4. Now when I do ftp://a.b.c.d on the firefox browser on my linux box..I get only a dialog box asking for the username and passwd. When I enter the username and passwd, the browser just hangs..

sambyte wrote...

[..i have a ftp server but when i type ftp://serverIP in a browser it does not ask for an password.....
it automatically takes me to the /var/ftp/pub directory..]

If Im not wrong U get this because you have anonymous_enable=YES in ur vsftpd.conf..It is enabled by default

I tried accoring to ur last post but it didnt work...
Im still gettin stuck at the same place


Thanks
Danish
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 - only one user can login to ftp greengrocer Linux - Newbie 4 12-08-2005 06:41 AM
vsftpd login problems ghost66 Linux - Software 0 11-08-2005 03:22 PM
Unable to login as local user with vsftpd running on the server kairamr Linux - Newbie 1 06-09-2004 03:25 PM
VSFTPD virtual user login using pam.d problem exalik Linux - Networking 3 11-07-2003 05:29 PM
vsftpd : process running as user nobody left after login ? markus1982 Linux - Security 4 01-18-2003 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:19 PM.

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