HELP: Excuting programs remotely through e-mail

HELP: Excuting programs remotely through e-mail

Post by Tung Yuen T » Fri, 14 Feb 1992 04:32:55



Is there anyway that I can excute commands or programs by remotely
sending email to my account?

My unix account does not allow remote logins.  And sometimes when I'm
away I need to read my mail through my friend's account.  I'm
thinking of writing a program so that everytime I send a email to
my account containing a command line, the program would respond and
send back all my mail back to the address I specify.

I have very little experience with the unix and its shells.
So please tell me if there's any commands or programs that I can use
in writing my program.  Or better yet, is there any programs out there
that shows how to do this?

Thanks for all your help!

Please email all replies.

                                                tom

 
 
 

HELP: Excuting programs remotely through e-mail

Post by Will Renk » Sun, 16 Feb 1992 02:54:59


To do this - execute stuff on a remote machine by e-mail
I do the following on the remote machine:
1. Run a cron job at regular intervals which reads mail (if there is some)
2. Parses the header most specifically selecting the Subject line
3. Calls a shell script passing the subject in the environment and the body
   via standard input
4. Called shell script re-acts base on subject

EG - if subject is newsread then body is expected to be a newsgroup and an article number.
The shell reads that article and mails it back to me.
What else could one do?  Let your imagination run wild!
--
------------------------------------------------------------------------------
 Will Renkel - Motorola - Cellular
 1501 W. Shure Drive - Room 2304, Arlington Heights, IL 60004


 
 
 

HELP: Excuting programs remotely through e-mail

Post by Raja Dao » Sun, 16 Feb 1992 17:48:11



>1. Run a cron job at regular intervals which reads mail (if there is some)
>2. Parses the header ...

[check if command or just email and act accordingly]

Line #1 above can also be replaced by an event driven method using
the .forward facility in mail.  Write in the .forward file a pipe to
the shell script (e.g. "| /home/directory/myscript") and the shell
script would read from stdin the incoming message.  If it's a command
act on it otherwise stuff it in your mbox.  This has the advantage of
not using CPU cycles all day long at regular intervals (although it's
not much cycles compared to those wasted reading newsgroups ! :-) ).

--Raja

 
 
 

HELP: Excuting programs remotely through e-mail

Post by Matthew Farwe » Tue, 18 Feb 1992 01:11:23



>To do this - execute stuff on a remote machine by e-mail
>I do the following on the remote machine:
>1. Run a cron job at regular intervals which reads mail (if there is some)
>2. Parses the header most specifically selecting the Subject line
>3. Calls a shell script passing the subject in the environment and the body
>   via standard input
>4. Called shell script re-acts base on subject

>EG - if subject is newsread then body is expected to be a newsgroup and
>an article number.
>The shell reads that article and mails it back to me.
>What else could one do?  Let your imagination run wild!

Let my imagination run wild as well.  If I found anyone doing this on
one of my machines, it'd be removed instantly until they could *prove*
that security wasn't being compromised.  Allowing a remote user to run a
process on my machine with *NO* authentication (you can forge email
remember) is not a good idea in my book.

Dylan.
--
If you can waggle it and he can feel it, you have a signalling system.

 
 
 

HELP: Excuting programs remotely through e-mail

Post by Insert Name He » Wed, 04 Mar 1992 08:23:22



[outline of how to do remote email reading]

Quote:>>What else could one do?  Let your imagination run wild!
> Let my imagination run wild as well.  If I found anyone doing this on
> one of my machines, it'd be removed instantly until they could *prove*
> that security wasn't being compromised.  Allowing a remote user to run a
> process on my machine with *NO* authentication (you can forge email
> remember) is not a good idea in my book.

Agreed.  As long as email can be forged, unauthicated logins are not a good
idea.  However, the danger could be lessened drastically by introducing
some sort of password system into the message somewhere in the headers or
body, and by keeping some record of what was done and from where.  This
would require passing a plaintext password over the network, but the danger
from that could be minimalized as well with vigilant upkeep of the
password.  


 
 
 

HELP: Excuting programs remotely through e-mail

Post by Joel M. Hoffm » Wed, 04 Mar 1992 10:04:18




>[outline of how to do remote email reading]

>> Let my imagination run wild as well.  If I found anyone doing this on
>> one of my machines, it'd be removed instantly until they could *prove*
>> that security wasn't being compromised.  Allowing a remote user to run a
>> process on my machine with *NO* authentication (you can forge email
>> remember) is not a good idea in my book.

*System* security isn't compromised at all.  The process will run with
the userid of the owner of the mail routine.  I don't really see how
letting unknown persons send mail and execute commands is any more
dangerous than letting ordinary users execute commands.  Remember, if
you're on the Internet, you already let unknown users finger your
system (thus accessing user-id information), etc.

-Joel

 
 
 

HELP: Excuting programs remotely through e-mail

Post by Matthew Farwe » Thu, 05 Mar 1992 04:48:31





>[outline of how to do remote email reading]
>>>What else could one do?  Let your imagination run wild!
>> Let my imagination run wild as well.  If I found anyone doing this on
>> one of my machines, it'd be removed instantly until they could *prove*
>> that security wasn't being compromised.  Allowing a remote user to run a
>> process on my machine with *NO* authentication (you can forge email
>> remember) is not a good idea in my book.
>Agreed.  As long as email can be forged, unauthicated logins are not a good
>idea.  However, the danger could be lessened drastically by introducing
>some sort of password system into the message somewhere in the headers or
>body, and by keeping some record of what was done and from where.  This
>would require passing a plaintext password over the network, but the danger
>from that could be minimalized as well with vigilant upkeep of the
>password.  

No, this wouldn't work either.  This assumes that someone isn't watching
your email go by and stealing your password as it goes through their
machine.

Dylan.
--
If you can waggle it and he can feel it, you have a signalling system.

 
 
 

HELP: Excuting programs remotely through e-mail

Post by David Smallbe » Thu, 12 Mar 1992 12:57:18





>>[outline of how to do remote email reading]
>>Agreed.  As long as email can be forged, unauthicated logins are not a good
>>idea.  However, the danger could be lessened drastically by introducing
>>some sort of password system into the message somewhere in the headers or
>>body, and by keeping some record of what was done and from where.  This
>>would require passing a plaintext password over the network, but the danger
>>from that could be minimalized as well with vigilant upkeep of the
>>password.  

>No, this wouldn't work either.  This assumes that someone isn't watching
>your email go by and stealing your password as it goes through their
>machine.

No.  You don't implement it as a simple plaintext password.  Here's one
possibility:
  1.    Write a program called, say, validate, that succeeds if its
        arguments satisfy some secret algorithm (e.g. the arguments are
        two integers x and y such that if y = f(x), where f is implemented
        in the validate program, then validate succeeds.
  2.    When an incoming message with a triggering subject line (e.g. "remote
        123 456") comes in, treat it as a valid trigger iff
        a. validate 123 456  succeeds   *and*
        b. 123 456  has not been used before (i.e., log the triggers).  This
           prevents repeat use of the same trigger.  *and*
        c. not very many triggers have come in recently (to prevent too many
           guesses).
  3.    Log the trigger.
  4.    If the trigger is valid, execute the body of the message as a script.

By making the validate program readable only by you and removing its
source, you reduce the chance of someone discovering your secret function.
If the function is easy to carry in your head, you can compute valid
triggers wherever you are.

If you have a paranoid system administrator, and all you want to do is
remotely read mail from an unknown-in-advance location, then arrange
things so that the *only* thing your message can trigger is a sending
of your mailbox to the return address of the trigger message.
--


 
 
 

1. HELP: Excuting programs remotely through e-mail.

Is there anyway that I can excute commands or programs by remotely
sending email to my account?

My unix account does not allow remote logins.  And sometimes when I'm
away I need to read my mail through my friend's account.  I'm
thinking of writing a program so that everytime I send a email to
my account containing a command line, the program would respond and
send back all my mail back to the address I specify.

I have very little experience with the unix and its shells.
So please tell me if there's any commands or programs that I can use
in writing my program.  Or better yet, is there any programs out there
that shows how to do this?

Thanks for all your help!

Please email all replies.

                                                tom

2. Pppd hangs up mysteriously

3. Excuting shell commands within C program

4. Is there a way to load share library dynamically in C on Unix platform?

5. excuting a program in a specific workspace??

6. Comeau C++ 4.0 Front-End Pre-Release

7. Can't run Xwindow programs remotely, HELP!

8. ksh

9. HELP! Cannot run some X programs remotely

10. HELP: Run X-Program remotely over SLIP

11. How to Remotely Execute a Job by an email subject line

12. Email external address thru Perl script

13. email thru lotus notes error - "policy reasons"