Thesis Problems


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Thesis Problems
# 1  
Old 11-12-2007
A Simple problem

Hey All

i want to be able to run command line commands in a java program, ive heard about java runtime, am i on the right track?

Cheers for the help

Last edited by gerperrett; 11-16-2007 at 10:08 AM..
# 2  
Old 11-12-2007
Quote:
Originally Posted by gerperrett
as it seems to me that the simple stuff is slowing me down.
Somehow the simple stuff seems to elude you, otherwise how comes you have questions? ;-))

Quote:
Originally Posted by gerperrett
I want to be able to shutdown, or restart a computer on a network if I am at the server.
Any details? Which OS does the client run? How fast do you want it to shut down? Fast? Faster? Fastest? Here are some some possibilities, sorted by velocity:

shutdown -h now
halt -q
print - "stand still!" > /dev/kmem

And which OS the server runs would help answering your question too, as every OS has its own facilities. There is a *little* difference between VMS, *ix, Plan 9, MVS, etc..

Btw., which authentication are you going to use? Kerberos? SSL? Nothing (like in: anybody can shut down everything at will?)

Sorry to put it so bluntly, but you don't come across like someone who has studied Computer Science almost to the end and is writing a thesis.

bakunin
# 3  
Old 11-12-2007
LOL, I love UNIX but tbh we had a class on it in second year but that only covered scripting and simple dialog programs, as far as setting up servers and running all of the nitty gritty commands, we never did that, if we had I'd have learnt it. So my thesis is a bit of a trial by fire

The Server I wish to set up will be running Ubuntu 7.1 and the single client on the network ( for testing purposes will be running Windows XP SP2 )

In theory i want an option in my project program to be able to see graphically that client and then select options like restart, logout shutdown.

i know with Windows Server 2003 you just type shutdown "IP" -r or something similar

Also running the inline commands is done with runtime in java, i just want to know if anyone has made a java program that has done this and if they've encountered problems?
# 4  
Old 11-12-2007
Ok, that is already some specification to work on.

On Unix you can remotely execute programs by opening a shell remotely and execute your command there. To open a shell you will have to use some sort of authentication. The least seucre is using "r-commands" (rexec, rlogin, rcmd, ...), which will require either paswword authentication (you don't want to do that in a program) or an ".rhosts" file in the home directory of the user you connect to.

Classical Unix would use Kerberos instead and there are "kerberized" variants of these r-commands, which will not rely on .rhosts-files, but on Kerberos-tickets. But these times are gone and Kerberos is not used widely any more.

Today the so-called SSL (Secure Socket Layer) protocol, a secured IP-protocol, is used mostly. There are some commands working on top of this protocol, namely scp (Secure CoPy) and ssh (Secure SHell). They authenticate either via password like the r-commands or via exchange of "keys" and "keyfiles". They are not easy to include into programs (ssh is somewhat difficult to script), but it can be done.

Recommended reading: manpages of rlogin/rexec/rcmd/rcp, Kerberos, ssh.

Each a book about all aspects of Kerberos and SSL is available from O'Reilly (and several others perhaps).

bakunin
# 5  
Old 11-12-2007
1. You may find the following commands useful.

ssh / su / sudo / shutdown / reboot / uptime

2. Yes a JVM,
Code:
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec(command);

 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Idea for master thesis related to Linux : Redhat.

Hello Team, I am on last semestr on my studies. I have a problem with choosing right thesis topic. Do You have maybe any ideas for thesis related to Linux area? I really need your help - the most important thing is that there should be research element in the topic because of master degree... (3 Replies)
Discussion started by: protos27
3 Replies

2. What is on Your Mind?

Linux training and MA thesis

Hello. First, sorry for me English. I'm new here. I need help. I'm from Poland and I write MA thesis about Linux courses in Europe and USA. Please write name company (and www. if You know) in ours country how offer training from Linux, no matter authorized or not (e.g. RH or Debian) . I want to... (0 Replies)
Discussion started by: chemic
0 Replies

3. Shell Programming and Scripting

while and do problems

Any ideas how to clear this error as it seems I dont understand if,do,while and els commands #!/bin/ksh set -x print "This script creates test messages" print "Please enter test case name" read testcasename echo $testcasename skipfield=Y while print "Do you want to skip this field... (4 Replies)
Discussion started by: andrew.p.mcderm
4 Replies

4. UNIX for Dummies Questions & Answers

Problems with using less

Hello, I am having problems with using less on Linux version 2.6.18-92.1.17.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)). I am using csh but have the same problems on bash. If I pipe something to less it works perfectly i.e. cat file | less... (9 Replies)
Discussion started by: z1dane
9 Replies

5. UNIX for Dummies Questions & Answers

problems with If

I'm having problems uses "if" it works fine when i do this. #!/bin/sh a= 10 qw= 2 w= 20 { if && ;then echo 3 fi } However if i try to do #!/bin/sh a= 10 (5 Replies)
Discussion started by: THM
5 Replies

6. UNIX for Dummies Questions & Answers

Another Thesis Problem

Hey All Just have another quick question (2 Replies)
Discussion started by: gerperrett
2 Replies

7. UNIX for Advanced & Expert Users

Problems with Last

Hi, I,ve a Unixware 7.1.3 working correctly for two years ago, since a several weeks I've a problem with the command last . The information that this command return is : For example : 1.- The user root , time login : 12:15 h, time logoff 12:15 h (the real time is 14:00). Connected time is... (3 Replies)
Discussion started by: By_Jam
3 Replies

8. News, Links, Events and Announcements

Distribute Master's Thesis Under GPL?

What does everyone think about distributing a Master's thesis under the GPL? If this license is not appropriate, is there a corresponding license which offers the same thing for documents? (0 Replies)
Discussion started by: chenly
0 Replies

9. UNIX for Advanced & Expert Users

'make' problems (compliation problems?)

I'm trying to compile and install both most recent version of 'make' and the most recent version of 'openssh' on my Sparc20. I've run into the following problems... and I don't know what they mean. Can someone please help me resolve these issues? I'm using the 'make' version that was... (5 Replies)
Discussion started by: xyyz
5 Replies
Login or Register to Ask a Question