Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > ftpd on Panther

ftpd on Panther
Thread Tools
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Nov 8, 2003, 01:35 AM
 
On pre-Panther builds I am almost positive I was able to create a user account via System Preferences and then, using Netinfo Manager, set their shell to /dev/null so they couldn't log in via telnet or ssh. Now when I do this it seems to disallow users to log in via ftp:

"User not allowed to use FTP"

Anyone know what's going on? Though this bug/feature is a pain, I'm glad that the chroot is fixed in Panther now, whereas ftp was pretty much broken for other users than the main admin account before.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Dedicated MacNNer
Join Date: Nov 2003
Location: SoCal
Status: Offline
Reply With Quote
Nov 9, 2003, 10:48 PM
 
Perhaps this is because the shell file is completely missing (/dev/null). Instead make an "ftponly" file and place it in /bin. You can have this file simply echo they have no access like (make sure it does exit 0; at least):

#!/bin/sh
#
# ftponly shell
#
/bin/echo "You are NOT allowed shell access to this system."

exit 0;

Then assign the user /bin/ftponly. Lastly add the ftponly to the /etc/shells list.

I hope this works for you.
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Nov 10, 2003, 06:43 PM
 
Originally posted by si_lance:
Perhaps this is because the shell file is completely missing (/dev/null). Instead make an "ftponly" file and place it in /bin. You can have this file simply echo they have no access like (make sure it does exit 0; at least):

#!/bin/sh
#
# ftponly shell
#
/bin/echo "You are NOT allowed shell access to this system."

exit 0;

Then assign the user /bin/ftponly. Lastly add the ftponly to the /etc/shells list.

I hope this works for you.
Interesting. I can't wait for the day where I come up with nifty little solutions like that. That's pretty cool, man. Thanks.

I've got a question, though, what does having the shell in /etc/shells do for the system? Users usually specify their shell by path, so I'm not sure what good having a list of all shells on a system does.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Dedicated MacNNer
Join Date: Nov 2003
Location: SoCal
Status: Offline
Reply With Quote
Nov 10, 2003, 11:47 PM
 
Daemons often check the user's shell against this list for connections. If it doesn't exist, no connectivity at all is granted (usually).
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Nov 11, 2003, 03:01 PM
 
Originally posted by si_lance:
Daemons often check the user's shell against this list for connections. If it doesn't exist, no connectivity at all is granted (usually).
So it's more of a safety measure than anything? It sounds like it's not mission critical that a "shell" be in /etc/shells, eh?

Thanks regardless.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:45 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2