LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 03-27-2006, 01:28 PM   #1
hunterhunter
Member
 
Registered: Nov 2005
Posts: 90

Rep: Reputation: 15
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!
 
Old 03-27-2006, 01:49 PM   #2
demented_are_go
Member
 
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50

Rep: Reputation: 15
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?
 
Old 03-27-2006, 01:51 PM   #3
hunterhunter
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
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.
 
Old 03-27-2006, 01:52 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
/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.
 
Old 03-27-2006, 01:55 PM   #5
hunterhunter
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
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
 
Old 03-27-2006, 02:27 PM   #6
demented_are_go
Member
 
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50

Rep: Reputation: 15
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.
 
Old 03-27-2006, 02:32 PM   #7
hunterhunter
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
Actually I do have chroot_local_user=YES

and ironically when the shell is set to /bin/bash they can still travel up to /


 
Old 03-27-2006, 02:42 PM   #8
demented_are_go
Member
 
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50

Rep: Reputation: 15
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.
 
Old 03-27-2006, 02:55 PM   #9
hunterhunter
Member
 
Registered: Nov 2005
Posts: 90

Original Poster
Rep: Reputation: 15
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
 
  


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
Urgent Question Regarding Urgent Questions! Need Help Now! Crashed_Again LQ Suggestions & Feedback 11 10-17-2007 08:07 PM
urgent question dgillis Linux - Newbie 4 08-14-2005 02:47 AM
Urgent Question Corallis Linux - Newbie 5 06-28-2004 09:40 PM
Parallel shells? (cluster question) Blinker_Fluid Linux - General 1 02-14-2004 12:49 AM
URGENT!: vsftpd chroot config wont take changes. Major business depends on this. Help CrewXp Linux - Newbie 5 01-02-2004 07:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:28 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