Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-27-2006, 01:28 PM
|
#1
|
Member
Registered: Nov 2005
Posts: 90
Rep:
|
vsftpd question, regarding shells - urgent please!
When I set a user's shell to /bin/false they can't login using ssh.
When I set it to /bin/bash the user can get in, however, the user can also travel up the tree all the way to /
What gives? I have it set to chroot them, why does it work with bash but not the false shell?
I have vsftpd set to not check for a valid shell either.
Thanks!
|
|
|
03-27-2006, 01:49 PM
|
#2
|
Member
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50
Rep:
|
because /bin/false means that the user will not login, it'll ask you for a password then drop the connection, it's logical no?
|
|
|
03-27-2006, 01:51 PM
|
#3
|
Member
Registered: Nov 2005
Posts: 90
Original Poster
Rep:
|
No. With proftpd it works fine with /bin/false
I think /bin/false is only so that the user cannot execute shell commands. Only ftp commands are accepted.
|
|
|
03-27-2006, 01:52 PM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
/bin/false isn't a shell, it's a program that just returns an error code. It's often used as a shell entry to stop users getting shell access.
|
|
|
03-27-2006, 01:55 PM
|
#5
|
Member
Registered: Nov 2005
Posts: 90
Original Poster
Rep:
|
gilead, what do you think is going on here then?
I have vsftpd set to
check_shells=NO
I set it to /bin/false - nothing
I set it to /bin/bash - I can log in...
There has got to be a way that users can use /bin/false to log in.
Right??
btw, when I set the user up with /bin/bash they can travel up the tree whether chroot is on or off in vsftpd...
Thanks
|
|
|
03-27-2006, 02:27 PM
|
#6
|
Member
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50
Rep:
|
shell set to /bin/false will block ssh access is all I'm saying.
What exactly are you trying to do? keep users from getting out of their home dirs when connecting through ftp?
If that's it... just use chroot_local_user=YES
And of course... don't supply a list, if you do that'll make it a list of users NOT to chroot.
That'll confine them to their home directory.
Last edited by demented_are_go; 03-27-2006 at 02:28 PM.
|
|
|
03-27-2006, 02:32 PM
|
#7
|
Member
Registered: Nov 2005
Posts: 90
Original Poster
Rep:
|
Actually I do have chroot_local_user=YES
and ironically when the shell is set to /bin/bash they can still travel up to /

|
|
|
03-27-2006, 02:42 PM
|
#8
|
Member
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50
Rep:
|
you must have messed up something else, I just installed vsftpd just to test this and make sure the solution given works and it does, if you login and cd .. it just takes you back to the same dir. My user's shell is set to /bin/bash as well. If you try to go back to / it'll act as if the dir was succesfully changed, but look at ls, you're still in the user's home dir.
|
|
|
03-27-2006, 02:55 PM
|
#9
|
Member
Registered: Nov 2005
Posts: 90
Original Poster
Rep:
|
Okay
Well I guess we're both sorta right then.
Here's the thing though. When I use FileZilla, and connect I can go up and down in the tree, anywhere I want. I'm thinking that FileZilla is not acting as an ftp client, but more of a secure shell client.
How do I prevent users that are logging into ssh from leaving their home directory then?
Thanks
|
|
|
All times are GMT -5. The time now is 11:24 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|