Blocking ftp users to connect using telnet


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Blocking ftp users to connect using telnet
# 1  
Old 02-23-2005
Question Blocking ftp users to connect using telnet

Hi everybody !

We have all flavors of Unix / Linux and we want to restrict ftp users to telnet our servers.

We can't disable telnet because we have other users using it.

Smilie Are there any thing that could be done to solve this thing ???

Best regards,
Julio Moreira
# 2  
Old 02-23-2005
I have a REDHAT box and configure users this way in passwd file. Users then have ftp access but no telnet access.

user:x:1001:1000:FTP User:/home/user:/sbin/nologin

By the way, never use telnet but use SSH.
# 3  
Old 02-23-2005
one other way:
go to the user's
".bash_profile" and adding in the line "exit" at the very end of the file.
It will act like it is starting a telnet session, then will drop them.

/home/username/.bash_profile is the path.
On the very last line type "exit", then save your changes.
# 4  
Old 02-23-2005
Quote:
Originally Posted by thumsup9
one other way:
go to the user's
".bash_profile" and adding in the line "exit" at the very end of the file.
It will act like it is starting a telnet session, then will drop them.

/home/username/.bash_profile is the path.
On the very last line type "exit", then save your changes.
But they can ftp in a new .profile and thus defeat this.

I like to use /bin/true and /bin/false for ftp shells. I put "true" in /etc/shells so a user with true can use ftp but cannot log in. If I want to lock them out of ftp as well, I can just switch the shell to "false".
# 5  
Old 02-23-2005
Quote:
Originally Posted by Perderabo
But they can ftp in a new .profile and thus defeat this.

I like to use /bin/true and /bin/false for ftp shells. I put "true" in /etc/shells so a user with true can use ftp but cannot log in. If I want to lock them out of ftp as well, I can just switch the shell to "false".
Good catch....don
# 6  
Old 02-24-2005
Quote:
Originally Posted by thumsup9
one other way:
go to the user's
".bash_profile" and adding in the line "exit" at the very end of the file.
It will act like it is starting a telnet session, then will drop them.

/home/username/.bash_profile is the path.
On the very last line type "exit", then save your changes.
Smilie That's a good idea, but what if we have a "global" .profile ?
# 7  
Old 02-24-2005
Computer I'll try it !!!

Quote:
Originally Posted by thumsup9
Good catch....don
Smilie That'd be great !!!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Looping connect call for a non blocking socket

will there be any unexpected results on looping connect call for a non blocking socket to determine the connection based on error code. I am getting connection unsuccessful intermittently and so wondering whether is the timeout 500 millisec not sufficient or looping connect cause any unexpected. ... (7 Replies)
Discussion started by: satish@123
7 Replies

2. AIX

ftp connect in passive mode , ftp settings

how to connect to ftp server in passive mode? ftp server.abc and how can i see ftp settings, doesn't exist some ftpd.conf there is some other file where i check the options and configurations of ftp server? Thanks (3 Replies)
Discussion started by: prpkrk
3 Replies

3. Programming

non blocking connect

OS : solaris 10 X86 I created stream socket, tries to connect to port 7 on the remote machine. After doing the non blocking connect call I did select with time out value is 3 secs. I am always getting timed out though I am writing prior to select. code: x=fcntl(S,F_GETFL,0);... (1 Reply)
Discussion started by: satish@123
1 Replies

4. UNIX for Dummies Questions & Answers

Which program can I use for blocking unauthorized access via/ssh/ftp

Hi, I need to install a program on my Centos 5.3 server that will block unauthorized ssh/ftp access attempts. The two features I require is that I should be able to configure the program to block the IP of the intruder after a a certain amount of access attempts and that it should display a... (3 Replies)
Discussion started by: mojoman
3 Replies

5. Solaris

Non-blocking connect readability & writeability

Hello, When using a non-blocking connect, is it _guaranteed_ that connection completion can be detected by selecting for writeability? I have encountered situations where the socket has returned both readable and writeable at the same time - having trawled the net, I have seen some old posts... (1 Reply)
Discussion started by: tristan12
1 Replies

6. UNIX for Dummies Questions & Answers

Blocking FTP login at Solaris

Hi, We have an application which runs on telnet port, application structure is file based, we have to give write permissions to all the users to all files so that they can work on the system. Recently we have noticed that all ordinary users can login through ftp and delete any file (... (7 Replies)
Discussion started by: nervous
7 Replies

7. Shell Programming and Scripting

ftp script not able to connect to ftp server.

I have the following ftp script to get files from a remote location. However, on running the script I find that I am not even able to connect to ftp server. I am able to connect to ftp server using other GUI ftp tools like WS_FTP using the same IP. IP used here is a dummy IP. What can go... (3 Replies)
Discussion started by: gram77
3 Replies

8. UNIX for Dummies Questions & Answers

telnet, ftp is running but can't connect from outside

Yesterday, I and all my users couldn't connect to my server using ssh, telnet or ftp even though they were running (keep getting "connection timed out" error message). This morning, my partner logon from the main console, restarted sshd and xinetd (I belive he didnt restarted the server), now I... (0 Replies)
Discussion started by: Micz
0 Replies

9. Solaris

connect whit Telnet without password

It's possible to connect whit Telnet (or rlogin) whithout password??? I must write a script (this script run on a windows machine), then after the connection on Unix machine, run a perl script and exit. I can know if an host can be consedered "Trusted" like SSH protocol? Thanks! (2 Replies)
Discussion started by: raffyTxT
2 Replies

10. UNIX for Dummies Questions & Answers

How to Re-connect to floating telnet sessions

We use SCO OSR5 with TermLIte to create telnet sessions. If you accidently click X on the TermLite screen and exit the session you leave process running. I've heard of a program that will allow you to re-connect to these 'floating' sessions and then be able to carry on your session. Does anyone... (2 Replies)
Discussion started by: mikeh
2 Replies
Login or Register to Ask a Question