From: Michele Andreoli ([email protected])
Date: Sun Mar 24 2002 - 08:36:41 CET
On Sat, Mar 23, 2002 at 08:02:55PM -0700, Daniel Webb wrote:
> More on this problem:
>
> Even though I have not changed the "shell" line in /etc/inetd.conf and it
> looks correct to me (it just executes /usr/sbin/in.rshd)
Note: /usr/sbin/in.rshd in a link to /usr/srv/bin/in.rshd.
The rshd daemon is a recent acquisition.
If your problem only is to submit a remote command to muLinux, you can
use two other mechanism:
1) the internal web server and a CGI script
2) a little netcat program.
I will describe the method 2) that require two scripts:
/usr/sbin/control and /usr/sbin/in.control.
a) create the script /usr/sbin/control
===========================================================
#!/bin/ash
while [ 1 ]
do
/usr/bin/nc -v -e /usr/sbin/in.control -l -p 99 2>>/var/log/control.log
done
===========================================================
b) create the script /usr/sbin/in.control
===========================================================
#!/sbin/ash
while [ 1 ]; do
read cmd
eval $cmd
done
===========================================================
c) run
/usr/sbin/control &
(or put in in inetd.conf)
control does run an instance of "nc", listening to tcp port 99. It exec
in.control and read every chars you send and execute it.
You can put in the main loop (in.control) a switch statement in order
to allow only a predefinite set of administrative commands.
This is the simple model used in other rustic daemon, such pygmy web
server, etc.
Michele
-- I keep trying to locate a meeting of Quantum Physicists. But everytime they set a meeting time, the location changes. And vice versa -- Anonymous --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:21 CET