Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-11-2009, 12:37 PM
|
#1
|
Member
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900
Rep:
|
FTP server that accepts any username and password
Hi everyone,
Sorry if this has been answered before, I've been looking around but not managing to come up with anything.
I have a bit of a weird situation. I'm doing some work on a mainframe system via VPN from an Ubuntu desktop. Occasionally it is necessary to export data from the mainframe to work on locally. This works through a bit of a kludge: so far as I can tell, the mainframe makes an FTP connection to the client computer, giving the username of the current (mainframe) user and password PASS.
In Windows there is a client program that allows the user to start a mini FTP server that receives the data. However, I haven't been able to find the same thing for Linux. Since it's just standard FTP protocol, I figured it should be possible to set up a server in Linux and configure it to accept the connections, as I've set up more standard FTP servers before.
However, I hit some snags. Using local users isn't possible because I can't create them with passwords of less than 6 characters. Using virtual/guest users seems to be very complicated, I had a go at that but got stuck (with vsftpd) on creating a PAM auth file. I'd really prefer something much simpler. I'm thinking along the lines of an FTP server that accepts connections given *any* username and password. I know that's extremely bad security practice, but it will be running on a secure office network over VPN, and I plan to keep it stopped by default and only start it when I need to transfer some data.
Does anyone have suggestions as to how I might do this? All the information I've been able to find is either for very basic anonymous FTP servers, or massively complicated (and properly secured) virtual user type setups.
Thanks in advance!
|
|
|
03-11-2009, 02:11 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,461
|
Quote:
Originally Posted by Gethyn
Hi everyone,
Sorry if this has been answered before, I've been looking around but not managing to come up with anything.
I have a bit of a weird situation. I'm doing some work on a mainframe system via VPN from an Ubuntu desktop. Occasionally it is necessary to export data from the mainframe to work on locally. This works through a bit of a kludge: so far as I can tell, the mainframe makes an FTP connection to the client computer, giving the username of the current (mainframe) user and password PASS.
In Windows there is a client program that allows the user to start a mini FTP server that receives the data. However, I haven't been able to find the same thing for Linux. Since it's just standard FTP protocol, I figured it should be possible to set up a server in Linux and configure it to accept the connections, as I've set up more standard FTP servers before.
However, I hit some snags. Using local users isn't possible because I can't create them with passwords of less than 6 characters. Using virtual/guest users seems to be very complicated, I had a go at that but got stuck (with vsftpd) on creating a PAM auth file. I'd really prefer something much simpler. I'm thinking along the lines of an FTP server that accepts connections given *any* username and password. I know that's extremely bad security practice, but it will be running on a secure office network over VPN, and I plan to keep it stopped by default and only start it when I need to transfer some data.
Does anyone have suggestions as to how I might do this? All the information I've been able to find is either for very basic anonymous FTP servers, or massively complicated (and properly secured) virtual user type setups.
Thanks in advance!
|
Try turning on anonymous users. The user ID will be "anonymous", and password will be whatever. That may help some...
|
|
|
03-11-2009, 04:16 PM
|
#3
|
Member
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900
Original Poster
Rep:
|
Thanks, unfortunately that doesn't get round the problem. Vsftpd (for example) is configured for anonymous access out of the box on Ubuntu, but the mainframe doesn't want to access anonymously, it insists on sending a username! What the people who designed the system were thinking I don't know.
I have managed to find a way round the problem, which is not optimal in a number of ways, but I thought it might be of interest to some so I'll explain what I did. The key was using a Java based ftp server called CrossFTP server. It has a pretty straightforward GUI configuration system, that allows virtual users with silly passwords like "PASS". The complication with it is that to get it to bind to port 21 it has to be run as root, but it's designed to be run through Java web start, which should be run as a regular user.
I really, really don't suggest anyone does this for a site on an untrusted network or for a proper FTP site, but I launched it as root using the command
Code:
user@local:~$ sudo javaws http://www.crossftp.com/crossftpserver.jnlp
Once it was launched it was simple to add in the FTP users the mainframe wanted to use, complete with weak passwords, and give them write access to a directory created just for receiving this data.
This doesn't answer the original question, but it enabled me to get things working. Of course, it requires root access on the local machine, and requires Java to be installed (I used the Ubuntu standard release of Sun Java 6, haven't tested any others), but I can live with that. Hope it helps other people!
|
|
|
All times are GMT -5. The time now is 06:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|