Operating System - HP-UX
1832765 Members
3306 Online
110045 Solutions
New Discussion

how to start a script from a windows machine on a unix box

 
Donald Kok
Respected Contributor

how to start a script from a windows machine on a unix box

a user wants to start a script from a windows machine on a unix box. He does not ever want to really logon.

So I thought of changing his logon shell behaviour to do the script, and logoff automaticaly.
Is this a good solutions or are there any better?
Any suggestions?
My systems are 100% Murphy Compliant. Guaranteed!!!
6 REPLIES 6
Maureen Gunkel
Trusted Contributor

Re: how to start a script from a windows machine on a unix box

Donald,
If the user wants it done at certain times/days, you could just use cron. But if the user wants to run it 'at will', then your plan will work. You could even set it up to run nohup, in the background, and just log out immediately.
HTH
No matter where you go, there you are.
CHRIS_ANORUO
Honored Contributor

Re: how to start a script from a windows machine on a unix box

Yes it is okay if he has the permissions to run it or create file.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Tim Malnati
Honored Contributor

Re: how to start a script from a windows machine on a unix box

One interesting way of accomplishibg this is with a terminal emulation program like WRQ's Reflection. With their macro language you can setup virtually anything that can run in a standard terminal window. Their connection wizard makes creating the macro a breeze where you just record an actual session and then save it as a desktop icon, start menu item or whatever.

There are also some other methods that could be accomplished with NFS or Samba where the unix file systems become visible to the windows machine. Probably not the most efficient way of doing it, but may be a good option if you need to have this connectivity established anyway.
Donald Kok
Respected Contributor

Re: how to start a script from a windows machine on a unix box

Maureen, I will check that out.

Tim, I planned to you Reflection indeed.

I do not know what kind of shell ( do I actually need a shell) to put in his passwd-entry.

Thanks for your reactions.
My systems are 100% Murphy Compliant. Guaranteed!!!
Patrick Wallek
Honored Contributor

Re: how to start a script from a windows machine on a unix box

The shell you would use in this users passwd file entry would actually be the script name that you want to run.

Something like this:

username:passwd:uid:gid:User_Info:/home/directory:/directory/script_to_run
Matt Livingston
Valued Contributor

Re: how to start a script from a windows machine on a unix box

WRQ's Reflections suite also has an "rcmd" client, so that you can run any Unix command directly from your Win32 machine without any deep magic beyond that behind the ~/.rhosts file. If you are going to go with Reflections for any other reason, this might just be your best option, depending on how you feel about the Berkeley 'r' commands.

Teraterm (http://www.vector.co.jp/authors/VA002416/teraterm.html) is a very small, free vt100 emulator/telnet client which has a fairly simple but capable macro language which could assist greatly in automating your task. Just tweak the supplied login.ttl macro file, and create a shortcut to it on your user's desktop.