Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing files from remote server

Status
Not open for further replies.

womp

Technical User
Apr 6, 2001
105
US
I am totally new to the whole Java programming bit so point me in the correct direction if my question does not fit this forum. I wish to create a java applet (I think) on our primary server which I want to access through a browser on my desktop system several miles away and look at the contents of files such as /etc/passwd. What are the correct words I use for researching this? remote java applet server?
 
Assume the name of the server you want to modify its /etc/passwd is called Server A.
Why do you want to use Java to modifiy the password of password of Server A? Do SSH login provide enough function and security to Server A?

If you want to use Java to modify the password file of Server A, you have to think more on security issue. And there is a chance that your password file may be corrupted When there is error in running Java Programming or there is network error. I highly recommend that you should change the password for root user.

The following is just my advice:
Java Applet<-->Server A runs Tomcat server(any Application Server supports Java Servlet) and has Java Servlet B that will alter the password file /etc/passwd

Your Java Applet may be stored on the same context with that Java Servet B.
 
An applet is something that is executed at client side. What you need (I think) it's a servlet. But if you provide more details maybe we can offer more help.

At first sight, I agree prosper: what you need is just and ssh or sftp feature, not a Java application.

Cheers,
Dian
 
What I am looking to do is:
Create a Java Interactive program on Server A that will allow me to Add, Find or Delete employees from our Unix server. This server (Server A) has other applications on it requiring me to open and close those applications in order to add or delete people as they are hired or retired. I wish to create one program that will allow me to "click" on the programs these people will have access to, add their login names, permission and so on with one window. Plus it's an advance training guide for programming Java for me that will take awhile to complete. I just want to know if it can be done with java alone without Tomcat or anything else
 
You may need Tomcat or an webserver that supports servlet, other you have to handle http response yourself. Or you may use Java Application to talk to another Java Application (a small server program) with socket.
Using Tomcat or webserver and running servlet is easier. But you need to know how to Java, Java Servlet and webserver.

I think you should not alter the content of /etc/passwd. You should use linux command to add user, modify or delete user.
The following is my updated advice:
applet<-->Server A runs Tomcat server(any Application Server supports Java Servlet) and has Java Servlet B and Servlet can call the Linux command like "adduser" ...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top