from HTML button to shell command

Chris Cunnington cunnington-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org
Fri Oct 27 20:15:13 UTC 2006


Hi All,

When people upload a Smalltalk image to my server, they
are going to need to turn it on. I do this using the shell, but I
cannot give my customers access to my shell. So, I'm looking for a CGI
way for people to start their image.

So far I have it that a customer goes to a password protected page.
They see a radio button and a submit button. They click both. This
triggers a Perl script in my operating system. In the script is the
system function. Inside the system function (because the command I
need to run on the shell must be executed by the root user) is the
sudo command. After the sudo command is the actual command I use on
the shell 'squeak -headless /home/ccunning/Seaside/Seaside2.6.image&'

So far I have success running the system command to output the date to my
browser. I've only hit upon using sudo, so I'll explore that today. I need
to find a flag for it that will execute the command in one
step, without making it a two step process by asking for the user's
password.

So, that's what I need: a way for people to turn their image on
without giving them shell access. If anything screams out at you about
my attempt to solve this problem, please let me know. I suppose there is a
standard way to get people to push a button on a website and have a command
execute on the shell, but I don't know it.

Chris

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list