Blocking FTP login at Solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Blocking FTP login at Solaris
# 1  
Old 09-16-2008
Question 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 ( belonging to that application, because they have write permissions on all the files ), can anybody please let me know how can we block all user-ids logging into Solaris system through FTP except users whose user-ids start with "kcc"?

One more thing, we can't completely block port 21 because one FTP server is running on the server for the documentation, for example: ftp://192.168.0.1/pub/English/Modules.html

We want to block FTP login through command line or any other FTP client, people can continue using FTP through web.

I hope, my query is explanatory enough.
# 2  
Old 09-16-2008
Unfortunately the default FTP daemon is pretty simple and you have to give it a list of all users who are denied access, in the not very logically named /etc/ftpusers.

This means that every time you add new users you have to remember to update this file. Therefore it's a good idea to automate it, maybe run a job out of cron that does something like:

Code:
awk -F: '!/^kcc/ {print $1}' /etc/passwd > /etc/ftpusers

# 3  
Old 09-16-2008
Thanks for your reply, it worked, but it adds root also to /etc/ftpusers, how can I stop that?
# 4  
Old 09-16-2008
Perhaps it might be better to exclude by UIDs as in
Code:
awk -F: '$3 > 100 && $3 < 60000 {print $1}' /etc/passwd > ......

# 5  
Old 09-17-2008
Not forgetting to exclude the kcc users...

Code:
awk -F: '$3 > 100 && $3 < 60000 && !/^kcc/ {print $1}' /etc/passwd > /etc/ftpusers

# 6  
Old 09-25-2008
Thanks for your replies, it worked but I have following issue now, as I mentioned earlier that our help is installed on a FTP server and path is as follows:

ftp://192.168.0.1/pub/English/Modules.html

I don't want to block to this FTP server, now when users click on Help, they are asked to enter Username & Password, users who are mentioned at /etc/ftpusers are not granted access to this, any workaround to allow users to be able to view those help files via FTP?
# 7  
Old 09-25-2008
In your position I would definitely serve that documentation using your web server, not your FTP server.

But if for some reason that's not possible... when they connect like that they are using anonymous FTP, so as long as you haven't added the 'ftp' user to /etc/ftpusers then it should still work as it did before. I'm presuming they were never prompted for username/password before?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Which are blocking and non-blocking api's in sockets in C ?

among the below socket programming api's, please let me know which are blocking and non-blocking. socket accept bind listen write read close (2 Replies)
Discussion started by: VSSajjan
2 Replies

2. Solaris

FTP log only shows FTP LOGIN FROM entry?

OS: Solaris 9 Configuration /etc/syslog.conf daemon.debug /etc/inetd.conf ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -A -l -d Found the ftp.log only generate those entries from other servers/hosts. Can we trace on all ftp entries either from/to the server? ... (6 Replies)
Discussion started by: KhawHL
6 Replies

3. Solaris

[Solved] Solaris 10 - Ftp Login incorrect

Hey everyone, I am trying to get a 2GB patch cluster FTP'd to a solaris 10 server. I have tried logging in via ftp, and both with root as well as my personal account, I get "Login Incorrect." I have verified that I can log in using telnet. -bash-3.00$ netstat -a |grep ftp *.ftp ... (10 Replies)
Discussion started by: msarro
10 Replies

4. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

5. 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

6. Solaris

Blocking outgoing connection to ports/host in solaris

Hi, I want to block all outgoing connection ( the IMAP ) to my exchnage . I have to do it in my solaris server; from solaris host no outgoing connection can be made to the imap server. Please help me to configure that. I am new in solaris. Kind regards, Akhtar (2 Replies)
Discussion started by: akhtarbd
2 Replies

7. Solaris

FTP login failed.

Hi guys, Can you please help me. I have SUN V100 server running solaris 8. I also have a Redhat Linux 6.2 machine and a windows XP machine on the network. I'm trying to copy files from the Linux and XP machines to the V100 server. When I try to ftp to the solaris machine, I'm challenged... (2 Replies)
Discussion started by: Stin
2 Replies

8. Shell Programming and Scripting

FTP script to FTP file to UNIX - Solaris

Hello, A couple of times per week, i receive emails notifications when files are available for processing. Currently i read these eamails with a java program and store the attachement on my C: drive and would now like to generate a PC script to send this file name up to UNIX-Solaris and... (3 Replies)
Discussion started by: bobk544
3 Replies

9. Solaris

Solaris 9 slow login thru ssh & ftp

When I ssh to my box, an Ultra 5. I get prompted for password immediately. I enter it and have to wait sometimes a full minute for it to prompt for a password. The same thing happens when i try to ftp to the box, it will say connected, but it takes forever to prompt for password, and... (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

10. UNIX for Dummies Questions & Answers

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. :confused: Are there any thing that could be done to solve this thing ??? Best regards, Julio Moreira (11 Replies)
Discussion started by: juliocdrm
11 Replies
Login or Register to Ask a Question