LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   vsFTPd user's not working? (https://www.linuxquestions.org/questions/linux-networking-3/vsftpd-users-not-working-320289/)

paul_mat 05-05-2005 02:06 AM

vsFTPd user's not working?
 
okay then, i'm running slackware 10.1 and vsftpd and i'm having problems with login in as different users

here is what it looks like when i log in as root using the bash command line

root@LearnS:/# ftp localhost
Connected to localhost.
220 Slackbox FTP
Name (localhost:root): root
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

here is what it looks like when i log in as a user using the bash command line.

root@LearnS:/# ftp localhost
Connected to localhost.
220 Slackbox FTP
Name (localhost:root): matthewsp
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp>

is there some way that i can choose users with FTP access or enable certain local users or something simple like that i'm missing.

as far as i understand all i need to do is add a new users with the 'adduser' command?

michaelsanford 05-05-2005 11:14 AM

They need to have a "valid" shell (i.e., a shell that appears in /etc/shells) The trick to this is that you can give someone an "ftp only" account by giving them a shell like /dev/null and putting /dev/null in /etc/shells. Then they can't log in over SSH but they can FTP.

So if you gave matthewsp a valid shell it should work.

Are you sure you didn't, say, mistype the password when you made the account (since the error is login incorrect)?

clinton 05-05-2005 12:07 PM

I believe the login "shell"

/sbin/nologin

is designed specifically with this sort of issue in mind.

michaelsanford 05-05-2005 01:37 PM

While that is true it doesn't come as a default on all distributions, Slackware being one of them.

Of course you can replace it with any custom script you like. As an aside, this is mine:
Code:

#!/bin/sh
echo "Access denied"
exit 1


zhar 05-05-2005 02:18 PM

On this subject. Whats the easiest way I can give someone FTP access on my linux box. Primarily for a game server I am running (allow map uploads, config uploads. etc.

I want to add users and set their permissions. Still learning this stuff.

I am using Fedora Core 3 btw.

paul_mat 05-05-2005 05:17 PM

hey you guys were right about the /bin/sh thing, once i changed it to /bin/bash and i could login via the command line no problems!

but i still can't log in via IE ... when i go to my ISP's ftp i get a login box, but i don't seam to get one when going to my own ftp://192.168.0.20, is there some way of doing this?

michaelsanford 05-05-2005 09:26 PM

Aah no login box. Well in that case, does your firewall block FTP ?

PS Re: setting up FTP http://www.linuxquestions.org/questi...ticle&artid=17

paul_mat 05-06-2005 12:04 AM

no my firewall dosn't block anything i've opened it up completely. i'd still like to be able to get the login box but someone has told me the way around this

ftp://user:pass@domain.com/

now although this has worked, it takes me to the root path "/" not to my user's home folder? am i mistaken in asumming thats were it is ment to go? or is there someway to insure that is were it goes? and if anyone can tell me how to force a login box to open up on IE that'd be great!

paul_mat 05-06-2005 12:04 AM

no my firewall dosn't block anything i've opened it up completely. i'd still like to be able to get the login box but someone has told me the way around this

ftp://user:password@domain.com

now although this has worked, it takes me to the root path "/" not to my user's home folder? am i mistaken in assuming thats were it is meant to go? or is there someway to insure that is were it goes? and if anyone can tell me how to force a login box to open up on IE that'd be great!

michaelsanford 05-06-2005 01:00 AM

Ah I think I can explain your problem. Since you entered NO username as the FTP URL in your browser your browser probably mistakenly assumed you were logging in anonymously and sent the anonymous credentials without ever asking you for yours.

If you enter ftp://username@domain.com without a password you should be prompted for one.

As for the folder you see...normally it should take you to that user's ~/ folder, which shouldn't be / but in some cases a browser may just issue a "cd /" and if your user isn't chroot-ed it'll take you all the way up to /, even if you can't access anything but ~/


All times are GMT -5. The time now is 06:30 AM.