FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 15th, 2000, 08:52 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
Using FreeBSD 3.4

I can define a user's FTP root to their directory using /etc/ftpchroot

But I can't do the same with telnet and I can't deny telnet without taking away FTP...

Telnet isn't a necessary feature for these users, so how do I deny telnet and not FTP? Or barring that how do I limit their telnet access to the user root? (long shot I know).

Reply With Quote
  #2  
Old November 15th, 2000, 09:32 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>how do I limit their telnet access to the user root?

Can't unless you write your own shell.

>>But I can't do the same with telnet and I can't deny telnet without taking away FTP

1) cat /etc/shells
#############################################
# $FreeBSD: src/etc/shells,v 1.3.2.1 2000/07/10 08:47:17 obrien Exp $
#
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/sh
/bin/csh
/bin/tcsh
#############################################
So that means, as long as a user has a shell from the choices above, he can login both FTP and Telnet.
2) Next, su to a non-system user or create a new user just for testing purpose, assign a /sbin/nologin shell to such user. Or use "vipw" to change the user's shell.
3) Telnet in and FTP in with such user, for Telnet, you would get "This account is not available" or something, for FTP, such user simply gets login failed, that is supposed to be because you need one more step as follow..
4) vi /etc/shells
add /sbin/nologin to the list so you should get:
/bin/sh
/bin/csh
/bin/tcsh
/sbin/nologin

As the cat /etc/shells from (1) mentions, "Ftpd will not allow users to connect who are not using one of these shells". Ftpd doesn't care whether it's nologin shell or whatever, as long as such shell is listed here and the user's shell belongs to one of these, such user is allow to FTP login, but not ssh/telnet.

Reply With Quote
  #3  
Old November 15th, 2000, 01:40 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
Fantastic! I knew YOU would have an answer!

Works like a charm.

Reply With Quote
  #4  
Old November 15th, 2000, 02:10 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
ooops! Spoke to soon. Logging in as one of the users so defined, the directory appears empty...

Reply With Quote
  #5  
Old December 6th, 2000, 04:06 PM
kenb kenb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Tempe, AZ, USA
Posts: 12 kenb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am trying to setup an FTP-only account on Linux RH6.1 box - and have the user login directory be their root so that cannot explore and view other directories/files on the machine. Does anyone know how I do this?

Reply With Quote
  #6  
Old January 6th, 2001, 02:30 PM
d0g1e
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
you could add an "#" in front of the "telnet"
line in /etc/inetd.conf and do a killall -HUP
inetd to restart the inet daemon. this stops
the telnet daemon from starting at boot-
time

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FreeBSD - FTP login w/o telnet

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap